/* Copyright (c) 2024 Alex Diener This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Alex Diener alex@ludobloom.com */ #ifndef __InspectorSceneMeshInstanceEditView_H__ #define __InspectorSceneMeshInstanceEditView_H__ typedef struct InspectorSceneMeshInstanceEditView InspectorSceneMeshInstanceEditView; #define InspectorSceneMeshInstanceEditView_superclass SidePanelSubview #include "modeler/QuaternionControl.h" #include "modeler/SidePanelSubview.h" #include "modeler/Types.h" #include "modeler/VectorPositionControl.h" #include "modeler/VectorScaleControl.h" #include "uielementcollection/UIFloatEditText.h" #include "uitoolkit/UICheckbox.h" #include "uitoolkit/UIContinuousSlider.h" #include "uitoolkit/UILabel.h" #include "utilities/IndexSelection.h" typedef void (* InspectorSceneMeshInstanceEditView_liveUpdateCallback)(void * context); typedef void (* InspectorSceneMeshInstanceEditView_updateCompleteCallback)(const char * description, void * context); #define InspectorSceneMeshInstanceEditView_ivars \ SidePanelSubview_ivars \ \ SceneEditData * scene; \ IndexSelection * selection; \ MeshViewTransform3D * viewTransform; \ InspectorSceneMeshInstanceEditView_liveUpdateCallback liveUpdateCallback; \ InspectorSceneMeshInstanceEditView_updateCompleteCallback updateCompleteCallback; \ void * callbackContext; \ UILabel * descriptionLabel; \ VectorPositionControl * offsetControl; \ UIFloatEditText * offsetEditFields[3]; \ VectorScaleControl * scaleControl; \ UIFloatEditText * scaleEditFields[3]; \ QuaternionControl * rotationControl; \ UIFloatEditText * rotationEditFields[4]; \ Quaternionf unnormalizedRotation; #define InspectorSceneMeshInstanceEditView_vtable(self_type) \ SidePanelSubview_vtable(self_type) stemobject_declare(InspectorSceneMeshInstanceEditView) InspectorSceneMeshInstanceEditView * InspectorSceneMeshInstanceEditView_create(SceneEditData * scene, IndexSelection * selection, MeshViewTransform3D * viewTransform, InspectorSceneMeshInstanceEditView_liveUpdateCallback liveUpdateCallback, InspectorSceneMeshInstanceEditView_updateCompleteCallback updateCompleteCallback, void * callbackContext, UIAppearance appearance); bool InspectorSceneMeshInstanceEditView_init(InspectorSceneMeshInstanceEditView * self, SceneEditData * scene, IndexSelection * selection, MeshViewTransform3D * viewTransform, InspectorSceneMeshInstanceEditView_liveUpdateCallback liveUpdateCallback, InspectorSceneMeshInstanceEditView_updateCompleteCallback updateCompleteCallback, void * callbackContext, UIAppearance appearance); void InspectorSceneMeshInstanceEditView_dispose(InspectorSceneMeshInstanceEditView * self); Color4f InspectorSceneMeshInstanceEditView_getBackgroundColor(InspectorSceneMeshInstanceEditView * self); void InspectorSceneMeshInstanceEditView_setScene(InspectorSceneMeshInstanceEditView * self, SceneEditData * scene); void InspectorSceneMeshInstanceEditView_selectionUpdated(InspectorSceneMeshInstanceEditView * self); #endif