OpenLexocad  27.1
OpenLxApp::SubElement Class Reference

A SubElement extends an Element. Together with the (parent) Element it describes an entity with multiple geometries. The spatial structure of SubElements is defined by their parent Elements. More...

#include <SubElement.h>

Inheritance diagram for OpenLxApp::SubElement:
OpenLxApp::Root Core::DocObjectObserver OpenLxApp::DocObject

Public Member Functions

virtual ~SubElement (void)
 
Misc
std::shared_ptr< ElementgetElement () const
 
std::shared_ptr< SubElementcopy () const
 
Representation
bool setGeometry (std::shared_ptr< Geometry > geo)
 
std::shared_ptr< GeometrygetGeometry () const
 
Geom::Trsf getGeometryToWorldTransform () const
 
Geom::Bnd_Box getBoundingBox () const
 
Placement
Geom::Ax2 getLocalPlacement () const
 
void setLocalPlacement (const Geom::Ax2 &pos)
 
Geom::Trsf getTransform () const
 
Geom::Trsf getLocalToWorldTransform () const
 
void setTransform (const Geom::Trsf &t)
 
void translate (const Geom::Vec &aVec, Geom::CoordSpace aCoordSpace=Geom::CoordSpace::WCS)
 
void rotate (const Geom::Ax1 &axis, double angle, Geom::CoordSpace aCoordSpace=Geom::CoordSpace::WCS)
 
bool getLocalAxes (Geom::Ax2 &localAxes)
 
void setLocalAxes (const Geom::Dir &zHeight, const Geom::Dir &xLength)
 
Topology
pConstShape getShape () const
 
pConstShape getLocalShape () const
 
Rendering
void setOglMaterial (const Draw::OglMaterial &mat, int faceIndex=-1)
 
Draw::OglMaterial getOglMaterial () const
 
void setAmbientColor (const Base::Color &aCol)
 
void setDiffuseColor (const Base::Color &aCol)
 
void setSpecularColor (const Base::Color &aCol)
 
void setEmissiveColor (const Base::Color &aCol)
 
void setReflectiveColor (const Base::Color &aCol)
 
void setShininess (int aVal)
 
void setTransparency (int aVal)
 
void setDrawStyle (const Draw::DrawStyle &ds)
 
Draw::DrawStyle getDrawStyle () const
 
void setLineWidth (float width)
 
void setTexture (const Draw::Texture2 &tex, int faceIndex=-1)
 
void setLengthAndCrossTexture (const Draw::Texture2 &lengthTexture, const Draw::Texture2 &crossTexture, const Draw::Texture2Transform &lengthTextureTrsf=Draw::Texture2Transform(), const Draw::Texture2Transform &crossTextureTrsf=Draw::Texture2Transform())
 
Attributes
void setPositionNb (long value)
 
long getPositionNb () const
 
bool isVisible () const
 
void setVisible (bool onoff)
 
void setAssociatedMaterial (std::shared_ptr< Material > aMaterial)
 
std::shared_ptr< MaterialgetAssociatedMaterial () const
 
void removeAssociatedMaterial ()
 
Python
bool registerPythonClass (const std::string &aClassName, const std::string &aParentClassName)
 
virtual Base::GlobalId getGlobalClassId () const
 
Properties
std::shared_ptr< PropertyIntegerregisterPropertyInteger (const std::string &aName, int aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyEnumregisterPropertyEnum (const std::string &aName, int aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyDoubleregisterPropertyDouble (const std::string &aName, double aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyButtonregisterPropertyButton (const std::string &aName, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyBoolregisterPropertyBool (const std::string &aName, bool aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyStringregisterPropertyString (const std::string &aName, Base::String aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< PropertyColorregisterPropertyColor (const std::string &aName, Base::Color aDefaultValue, Property::Visible aVisible=Property::VISIBLE, Property::Editable aEditable=Property::EDITABLE, int aTranslationId=-1)
 
std::shared_ptr< OpenLxApp::PropertygetProperty (const std::string &aName) const
 
std::map< std::string, std::shared_ptr< Property > > getPropertyMap () const
 
std::shared_ptr< PropertyIntegergetPropertyInteger (const std::string &aName) const
 
std::shared_ptr< PropertyEnumgetPropertyEnum (const std::string &aName) const
 
std::shared_ptr< PropertyDoublegetPropertyDouble (const std::string &aName) const
 
std::shared_ptr< PropertyButtongetPropertyButton (const std::string &aName) const
 
std::shared_ptr< PropertyBoolgetPropertyBool (const std::string &aName) const
 
std::shared_ptr< PropertyStringgetPropertyString (const std::string &aName) const
 
std::shared_ptr< PropertyColorgetPropertyColor (const std::string &aName) const
 
bool isRegisteredProperty (const std::string &aName) const
 
virtual void onPropertyChanged (const std::string &aPropertyName)
 
virtual void onScaling (const Geom::Vec &aVec, const Geom::Pnt &aScaleBasePnt)
 
virtual void translateAfterScaled (const Geom::Vec &aVec, const Geom::Pnt &aScaleBasePnt)
 
void setStandardManipulatorPolicy (const Core::StandardManipulatorPolicy &aPolicy)
 
void setPropertyHeader (const Base::String &aDefaultName, int aTranslationId)
 
void setPropertyGroupName (const Base::String &aDefaultName, int aTranslationId)
 
Base::String getPropertyHeader () const
 
Base::String getPropertyGroupName () const
 
- Public Member Functions inherited from OpenLxApp::Root
void setUserName (const Base::String &aName)
 
Base::String getUserName () const
 
virtual ~Root (void)
 
Base::GlobalId getGlobalId () const
 
bool setGlobalId (const Base::GlobalId &aGlobalId)
 
- Public Member Functions inherited from OpenLxApp::DocObject
std::shared_ptr< DocumentgetDocument () const
 
bool isNew () const
 
bool isUpdated () const
 
bool isValid () const
 
bool hasErrors () const
 
void touch ()
 
LxIfc4::LxIfc4EntityEnum getEntityType () const
 
std::string getEntityTypeAsString () const
 
std::shared_ptr< Core::DbgInfogetDbgInfo () const
 
 DocObject (Core::DocObject *aObject)
 
virtual ~DocObject (void)
 
Core::DocObject__getObj__ () const
 
- Public Member Functions inherited from Core::DocObjectObserver
virtual ~DocObjectObserver ()
 

Protected Member Functions

void onChange (Core::DocObject *aCaller, const Core::DocObjectObserverMsg &aReason) override
 
 SubElement ()
 
- Protected Member Functions inherited from OpenLxApp::Root
 Root ()
 
- Protected Member Functions inherited from OpenLxApp::DocObject
 DocObject ()
 

Additional Inherited Members

- Protected Attributes inherited from OpenLxApp::DocObject
Core::DocObject_coreObj = nullptr
 

Detailed Description

A SubElement extends an Element. Together with the (parent) Element it describes an entity with multiple geometries. The spatial structure of SubElements is defined by their parent Elements.

Constructor & Destructor Documentation

◆ ~SubElement()

virtual OpenLxApp::SubElement::~SubElement ( void  )
virtual

◆ SubElement()

OpenLxApp::SubElement::SubElement ( )
inlineprotected

Member Function Documentation

◆ copy()

std::shared_ptr<SubElement> OpenLxApp::SubElement::copy ( ) const

◆ getAssociatedMaterial()

std::shared_ptr<Material> OpenLxApp::SubElement::getAssociatedMaterial ( ) const

◆ getBoundingBox()

Geom::Bnd_Box OpenLxApp::SubElement::getBoundingBox ( ) const

◆ getDrawStyle()

Draw::DrawStyle OpenLxApp::SubElement::getDrawStyle ( ) const

◆ getElement()

std::shared_ptr<Element> OpenLxApp::SubElement::getElement ( ) const

◆ getGeometry()

std::shared_ptr<Geometry> OpenLxApp::SubElement::getGeometry ( ) const

◆ getGeometryToWorldTransform()

Geom::Trsf OpenLxApp::SubElement::getGeometryToWorldTransform ( ) const

◆ getGlobalClassId()

virtual Base::GlobalId OpenLxApp::SubElement::getGlobalClassId ( ) const
virtual

◆ getLocalAxes()

bool OpenLxApp::SubElement::getLocalAxes ( Geom::Ax2 localAxes)

◆ getLocalPlacement()

Geom::Ax2 OpenLxApp::SubElement::getLocalPlacement ( ) const

◆ getLocalShape()

pConstShape OpenLxApp::SubElement::getLocalShape ( ) const

◆ getLocalToWorldTransform()

Geom::Trsf OpenLxApp::SubElement::getLocalToWorldTransform ( ) const

◆ getOglMaterial()

Draw::OglMaterial OpenLxApp::SubElement::getOglMaterial ( ) const

◆ getPositionNb()

long OpenLxApp::SubElement::getPositionNb ( ) const

◆ getProperty()

std::shared_ptr<OpenLxApp::Property> OpenLxApp::SubElement::getProperty ( const std::string &  aName) const

◆ getPropertyBool()

std::shared_ptr<PropertyBool> OpenLxApp::SubElement::getPropertyBool ( const std::string &  aName) const

◆ getPropertyButton()

std::shared_ptr<PropertyButton> OpenLxApp::SubElement::getPropertyButton ( const std::string &  aName) const

◆ getPropertyColor()

std::shared_ptr<PropertyColor> OpenLxApp::SubElement::getPropertyColor ( const std::string &  aName) const

◆ getPropertyDouble()

std::shared_ptr<PropertyDouble> OpenLxApp::SubElement::getPropertyDouble ( const std::string &  aName) const

◆ getPropertyEnum()

std::shared_ptr<PropertyEnum> OpenLxApp::SubElement::getPropertyEnum ( const std::string &  aName) const

◆ getPropertyGroupName()

Base::String OpenLxApp::SubElement::getPropertyGroupName ( ) const

◆ getPropertyHeader()

Base::String OpenLxApp::SubElement::getPropertyHeader ( ) const

◆ getPropertyInteger()

std::shared_ptr<PropertyInteger> OpenLxApp::SubElement::getPropertyInteger ( const std::string &  aName) const

◆ getPropertyMap()

std::map<std::string, std::shared_ptr<Property> > OpenLxApp::SubElement::getPropertyMap ( ) const

◆ getPropertyString()

std::shared_ptr<PropertyString> OpenLxApp::SubElement::getPropertyString ( const std::string &  aName) const

◆ getShape()

pConstShape OpenLxApp::SubElement::getShape ( ) const

◆ getTransform()

Geom::Trsf OpenLxApp::SubElement::getTransform ( ) const

◆ isRegisteredProperty()

bool OpenLxApp::SubElement::isRegisteredProperty ( const std::string &  aName) const

◆ isVisible()

bool OpenLxApp::SubElement::isVisible ( ) const

◆ onChange()

void OpenLxApp::SubElement::onChange ( Core::DocObject aCaller,
const Core::DocObjectObserverMsg aReason 
)
overrideprotectedvirtual

Reimplemented from Core::DocObjectObserver.

◆ onPropertyChanged()

virtual void OpenLxApp::SubElement::onPropertyChanged ( const std::string &  aPropertyName)
virtual

◆ onScaling()

virtual void OpenLxApp::SubElement::onScaling ( const Geom::Vec aVec,
const Geom::Pnt aScaleBasePnt 
)
virtual

◆ registerPropertyBool()

std::shared_ptr<PropertyBool> OpenLxApp::SubElement::registerPropertyBool ( const std::string &  aName,
bool  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyButton()

std::shared_ptr<PropertyButton> OpenLxApp::SubElement::registerPropertyButton ( const std::string &  aName,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyColor()

std::shared_ptr<PropertyColor> OpenLxApp::SubElement::registerPropertyColor ( const std::string &  aName,
Base::Color  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyDouble()

std::shared_ptr<PropertyDouble> OpenLxApp::SubElement::registerPropertyDouble ( const std::string &  aName,
double  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyEnum()

std::shared_ptr<PropertyEnum> OpenLxApp::SubElement::registerPropertyEnum ( const std::string &  aName,
int  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyInteger()

std::shared_ptr<PropertyInteger> OpenLxApp::SubElement::registerPropertyInteger ( const std::string &  aName,
int  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPropertyString()

std::shared_ptr<PropertyString> OpenLxApp::SubElement::registerPropertyString ( const std::string &  aName,
Base::String  aDefaultValue,
Property::Visible  aVisible = Property::VISIBLE,
Property::Editable  aEditable = Property::EDITABLE,
int  aTranslationId = -1 
)

◆ registerPythonClass()

bool OpenLxApp::SubElement::registerPythonClass ( const std::string &  aClassName,
const std::string &  aParentClassName 
)

◆ removeAssociatedMaterial()

void OpenLxApp::SubElement::removeAssociatedMaterial ( )

◆ rotate()

void OpenLxApp::SubElement::rotate ( const Geom::Ax1 axis,
double  angle,
Geom::CoordSpace  aCoordSpace = Geom::CoordSpace::WCS 
)

◆ setAmbientColor()

void OpenLxApp::SubElement::setAmbientColor ( const Base::Color aCol)

◆ setAssociatedMaterial()

void OpenLxApp::SubElement::setAssociatedMaterial ( std::shared_ptr< Material aMaterial)

◆ setDiffuseColor()

void OpenLxApp::SubElement::setDiffuseColor ( const Base::Color aCol)

◆ setDrawStyle()

void OpenLxApp::SubElement::setDrawStyle ( const Draw::DrawStyle &  ds)

◆ setEmissiveColor()

void OpenLxApp::SubElement::setEmissiveColor ( const Base::Color aCol)

◆ setGeometry()

bool OpenLxApp::SubElement::setGeometry ( std::shared_ptr< Geometry geo)

◆ setLengthAndCrossTexture()

void OpenLxApp::SubElement::setLengthAndCrossTexture ( const Draw::Texture2 &  lengthTexture,
const Draw::Texture2 &  crossTexture,
const Draw::Texture2Transform &  lengthTextureTrsf = Draw::Texture2Transform(),
const Draw::Texture2Transform &  crossTextureTrsf = Draw::Texture2Transform() 
)

◆ setLineWidth()

void OpenLxApp::SubElement::setLineWidth ( float  width)

◆ setLocalAxes()

void OpenLxApp::SubElement::setLocalAxes ( const Geom::Dir zHeight,
const Geom::Dir xLength 
)

◆ setLocalPlacement()

void OpenLxApp::SubElement::setLocalPlacement ( const Geom::Ax2 pos)

◆ setOglMaterial()

void OpenLxApp::SubElement::setOglMaterial ( const Draw::OglMaterial &  mat,
int  faceIndex = -1 
)

◆ setPositionNb()

void OpenLxApp::SubElement::setPositionNb ( long  value)

◆ setPropertyGroupName()

void OpenLxApp::SubElement::setPropertyGroupName ( const Base::String aDefaultName,
int  aTranslationId 
)

◆ setPropertyHeader()

void OpenLxApp::SubElement::setPropertyHeader ( const Base::String aDefaultName,
int  aTranslationId 
)

◆ setReflectiveColor()

void OpenLxApp::SubElement::setReflectiveColor ( const Base::Color aCol)

◆ setShininess()

void OpenLxApp::SubElement::setShininess ( int  aVal)

◆ setSpecularColor()

void OpenLxApp::SubElement::setSpecularColor ( const Base::Color aCol)

◆ setStandardManipulatorPolicy()

void OpenLxApp::SubElement::setStandardManipulatorPolicy ( const Core::StandardManipulatorPolicy aPolicy)

◆ setTexture()

void OpenLxApp::SubElement::setTexture ( const Draw::Texture2 &  tex,
int  faceIndex = -1 
)

◆ setTransform()

void OpenLxApp::SubElement::setTransform ( const Geom::Trsf t)

◆ setTransparency()

void OpenLxApp::SubElement::setTransparency ( int  aVal)

◆ setVisible()

void OpenLxApp::SubElement::setVisible ( bool  onoff)

◆ translate()

void OpenLxApp::SubElement::translate ( const Geom::Vec aVec,
Geom::CoordSpace  aCoordSpace = Geom::CoordSpace::WCS 
)

◆ translateAfterScaled()

virtual void OpenLxApp::SubElement::translateAfterScaled ( const Geom::Vec aVec,
const Geom::Pnt aScaleBasePnt 
)
virtual

The documentation for this class was generated from the following file: