30 : m_fixedId(object.m_fixedId),
31 m_modelRedraw(object.m_modelRedraw),
32 m_forceRedraw(object.m_forceRedraw),
33 m_opacity(object.m_opacity),
34 m_visible(object.m_visible),
35 m_selected(object.m_selected),
36 m_lockedVisibility(object.m_lockedVisibility),
37 m_colorsDisplayed(object.m_colorsDisplayed),
38 m_normalsDisplayed(object.m_normalsDisplayed),
39 m_sfDisplayed(object.m_sfDisplayed),
40 m_tempColor(object.m_tempColor),
41 m_colorIsOverridden(object.m_colorIsOverridden),
42 m_glTrans(object.m_glTrans),
43 m_glTransEnabled(object.m_glTransEnabled),
44 m_showNameIn3D(object.m_showNameIn3D) {}
98 }
catch (
const std::bad_alloc&) {
147 : visible(dobj.m_visible),
148 colorsDisplayed(dobj.m_colorsDisplayed),
149 normalsDisplayed(dobj.m_normalsDisplayed),
150 sfDisplayed(dobj.m_sfDisplayed),
151 colorIsOverridden(dobj.m_colorIsOverridden),
152 showNameIn3D(dobj.m_showNameIn3D) {}
157 }
catch (
const std::bad_alloc&) {
158 CVLog::Warning(
"Not enough memory to push the current display state");
168 if (state && apply) {
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Generic interface for (3D) drawable entities.
virtual bool colorsShown() const
Returns whether colors are shown or not.
virtual void setGLTransformation(const ccGLMatrix &trans)
Associates entity with a GL transformation (rotation + translation)
bool m_sfDisplayed
Specifies whether scalar field should be displayed.
virtual bool addClipPlanes(const ccClipPlane &plane)
Registers a new clipping plane.
virtual bool pushDisplayState()
Pushes the current display state.
virtual bool hasDisplayedScalarField() const
Returns whether an active scalar field is available or not.
bool m_colorsDisplayed
Specifies whether colors should be displayed.
virtual bool hasColors() const
Returns whether colors are enabled or not.
virtual void lockVisibility(bool state)
Locks/unlocks visibility.
virtual void setVisible(bool state)
Sets entity visibility.
virtual bool sfShown() const
Returns whether active scalar field is visible.
bool m_visible
Specifies whether the object is visible or not.
virtual void applyDisplayState(const DisplayState &state)
Applies a display state.
virtual void translateGL(const CCVector3 &trans)
Translates current GL transformation by a rotation matrix.
virtual bool normalsShown() const
Returns whether normals are shown or not.
virtual void toggleClipPlanes(CC_DRAW_CONTEXT &context, bool enable)
Enables or disables clipping planes (OpenGL)
virtual bool hasNormals() const
Returns whether normals are enabled or not.
bool m_glTransEnabled
Current GL transformation activation state.
virtual void setRedraw(bool state)
Sets entity redraw mode.
virtual bool isColorOverridden() const
virtual void setTempColor(const ecvColor::Rgb &col, bool autoActivate=true)
Sets current temporary (unique)
ccGLMatrix m_glTrans
Current GL transformation.
virtual void setFixedId(bool state)
virtual void showNameIn3D(bool state)
Sets whether name should be displayed in 3D.
virtual void enableTempColor(bool state)
Set temporary color activation state.
virtual void showNormals(bool state)
Sets normals visibility.
virtual void enableGLTransformation(bool state)
Enables/disables associated GL transformation.
std::vector< DisplayState::Shared > m_displayStateStack
The stack of pushed display states.
bool m_showNameIn3D
Whether name is displayed in 3D or not.
ccDrawableObject()
Default constructor.
virtual void showColors(bool state)
Sets colors visibility.
virtual void showSF(bool state)
Sets active scalarfield visibility.
virtual void setForceRedraw(bool state)
Sets force redraw.
virtual void setOpacity(float opacity)
Set opacity activation state.
virtual void rotateGL(const ccGLMatrix &rotMat)
Multiplies (left) current GL transformation by a rotation matrix.
virtual void resetGLTransformation()
Resets associated GL transformation.
bool m_colorIsOverridden
Temporary (unique) color activation state.
virtual void popDisplayState(bool apply=true)
Pops the last pushed display state.
bool m_normalsDisplayed
Specifies whether normals should be displayed.
virtual void getDrawingParameters(glDrawParams ¶ms) const
Returns main OpenGL parameters for this entity.
ccClipPlaneSet m_clipPlanes
Active clipping planes (used for display only)
ecvColor::Rgb m_tempColor
Temporary (unique) color.
virtual void setSelected(bool state)
Selects/Unselects entity.
virtual void toIdentity()
Sets matrix to identity.
Float version of ccGLMatrixTpl.
constexpr Rgb white(MAX, MAX, MAX)
Simple (clipping) plane equation.
QSharedPointer< DisplayState > Shared
Display parameters of a 3D entity.
bool showColors
Display colors.
bool showNorms
Display normals.
bool showSF
Display scalar field (prioritary on colors)