OpendTect  6.6
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
visBase::VertexShape Class Reference
Inheritance diagram for visBase::VertexShape:
[legend]

Public Types

enum  BindType {
  BIND_OFF = 0 , BIND_OVERALL , BIND_PER_PRIMITIVE_SET , BIND_PER_PRIMITIVE ,
  BIND_PER_VERTEX
}
 
- Public Types inherited from ObjectWithName
typedef OD::String name_type
 

Public Member Functions

 VertexShape ()
 
void addPrimitiveSet (Geometry::PrimitiveSet *)
 
void coordinatesChangedCB (CallBacker *)
 
void dirtyCoordinates ()
 
void enableCoordinatesChangedCB (bool yn)
 
void forceRedraw (bool=true)
 
virtual const char * getClassName () const
 
virtual Coordinates * getCoordinates ()
 
virtual const Coordinates * getCoordinates () const
 
const visBase::Transformation * getDisplayTransformation () const
 
int getNormalBindType ()
 
Normals * getNormals ()
 
const Normals * getNormals () const
 
Coord3 getOsgNormal (int) const
 
Geometry::PrimitiveSet * getPrimitiveSet (int)
 
TextureCoords * getTextureCoords ()
 
const TextureCoords * getTextureCoords () const
 
const unsigned char * getTextureData (int &, int &, int &) const
 
void materialChangeCB (CallBacker *)
 
int nrPrimitiveSets () const
 
void removeAllPrimitiveSets ()
 
void removePrimitiveSet (const Geometry::PrimitiveSet *)
 
void removeSwitch ()
 
void setAttribAndMode (osg::StateAttribute *)
 
void setColorBindType (BindType)
 
virtual void setCoordinates (Coordinates *coords)
 
virtual void setDisplayTransformation (const visBase::Transformation *)
 
virtual void setLineStyle (const OD::LineStyle &)
 
void setMaterial (Material *mt)
 
void setNormalBindType (BindType)
 
void setNormals (Normals *)
 
void setPrimitiveType (Geometry::PrimitiveSet::PrimitiveType)
 Should be called before adding statesets. More...
 
void setTextureChannels (TextureChannels *)
 
void setTextureCoords (TextureCoords *)
 
virtual void touchPrimitiveSet (int)
 
void updatePartialGeometry (Interval< int >)
 
bool useOsgAutoNormalComputation () const
 
void useOsgAutoNormalComputation (bool)
 
void useVertexBufferRender (bool yn)
 
- Public Member Functions inherited from visBase::Shape
void enableRenderLighting (bool)
 
void fillPar (IOPar &) const
 
Material * getMaterial ()
 
const Material * getMaterial () const
 
int getMaterialBinding () const
 
void setMaterialBinding (int)
 
void setRenderMode (RenderMode)
 
int usePar (const IOPar &)
 osg default render lighting is on More...
 
- Public Member Functions inherited from visBase::VisualObject
NotifierAccess * deSelection ()
 
virtual bool getBoundingBox (Coord3 &min, Coord3 &max) const
 
virtual NotifierAccess * rightClicked ()
 
const EventInfo * rightClickedEventInfo () const
 
const TypeSet< int > * rightClickedPath () const
 
bool selectable () const
 
NotifierAccess * selection ()
 
virtual void setSceneEventCatcher (EventCatcher *)
 
void setSelectable (bool yn)
 
- Public Member Functions inherited from visBase::DataObject
template<class T >
T * addNodeState (T *ns)
 
void deSelect () const
 
void enableTraversal (unsigned int mask, bool yn=true)
 
virtual const char * errMsg () const
 
SoNode * getInventorNode ()
 
const SoNode * getInventorNode () const
 
virtual BufferString getName () const
 
NodeState * getNodeState (int idx)
 
virtual float getPixelDensity () const
 
int id () const
 
virtual bool isOK () const
 
virtual bool isOn () const
 
bool isPickable (bool actively=true) const
 
virtual bool isRightHandSystem () const
 
virtual bool isSelected () const
 
bool isTraversalEnabled (unsigned int mask) const
 
virtual const OD::String & name () const
 
osg::Node * osgNode (bool skipswitch=false)
 
const osg::Node * osgNode (bool skipswitch=false) const
 
NodeState * removeNodeState (NodeState *)
 
virtual bool rightClickable () const
 
void select () const
 
bool serialize (const char *filename, bool binary=false)
 
void setID (int nid)
 
virtual void setName (const char *)
 
void setName (const uiString &uistr)
 
void setParent (DataObjectGroup *g)
 
void setPickable (bool actively, bool passively=true)
 
virtual void setPixelDensity (float dpi)
 
virtual void setRightHandSystem (bool yn)
 
void setUiName (const uiString &)
 
virtual bool turnOn (bool yn)
 
uiString uiName () const
 
void updateSel () const
 
- Public Member Functions inherited from NamedCallBacker
 NamedCallBacker (const char *nm=0)
 
 NamedCallBacker (const NamedCallBacker &)
 
virtual Notifier< NamedCallBacker > & objectToBeDeleted () const
 
bool operator== (const NamedCallBacker &oth) const
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (const NotifierAccess &, const CallBack &, bool onlyifnew=false) const
 
bool attachCB (const NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false) const
 
void detachAllNotifiers () const
 Call from the destructor of your inherited object. More...
 
void detachCB (const NotifierAccess &, const CallBack &) const
 
void detachCB (const NotifierAccess *notif, const CallBack &cb) const
 
virtual bool isCapsule () const
 
bool isNotifierAttached (const NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 
void stopReceivingNotifications () const
 
- Public Member Functions inherited from NamedObject
 NamedObject (const char *nm=nullptr)
 
 NamedObject (const NamedObject &oth)
 
virtual ~NamedObject ()
 
bool getNameFromPar (const IOPar &)
 
NamedObject & operator= (const NamedObject &)
 
bool operator== (const NamedObject &oth) const
 
- Public Member Functions inherited from ObjectWithName
virtual ~ObjectWithName ()
 
bool hasName (const char *nm) const
 
bool hasName (const name_type &nm) const
 
void putNameInPar (IOPar &) const
 

Static Public Member Functions

static VertexShape * create ()
 
static const char * getStaticClassName ()
 
static void initClass ()
 
static const char * sFactoryKeyword ()
 
- Static Public Member Functions inherited from visBase::Shape
static int cOverallMaterialBinding ()
 
static int cPerVertexMaterialBinding ()
 
- Static Public Member Functions inherited from visBase::DataObject
static osgViewer::CompositeViewer * getCommonViewer ()
 
static float getDefaultPixelDensity ()
 
static int getID (const osg::Node *)
 
static bool isVisualizationThread ()
 
static void requestSingleRedraw ()
 
static void setCommonViewer (osgViewer::CompositeViewer *)
 
static void setDefaultPixelDensity (float)
 
static void setVisualizationThread (const void *)
 Call only once from initialization. More...
 
- Static Public Member Functions inherited from CallBacker
static void createReceiverForCurrentThread ()
 
static void removeReceiverForCurrentThread ()
 

Protected Member Functions

 VertexShape (Geometry::PrimitiveSet::PrimitiveType, bool creategeode)
 
 ~VertexShape ()
 
virtual void addPrimitiveSetToScene (osg::PrimitiveSet *)
 
Normals * gtNormals () const
 
TextureCoords * gtTextureCoords () const
 
virtual void removePrimitiveSetFromScene (const osg::PrimitiveSet *)
 
void setUpdateVar (bool &var, bool yn)
 Will trigger redraw request if necessary. More...
 
void setupOsgNode ()
 
- Protected Member Functions inherited from visBase::Shape
 Shape ()
 
virtual ~Shape ()
 
Material * gtMaterial () const
 
- Protected Member Functions inherited from visBase::VisualObject
 VisualObject (bool selectable=false)
 
 ~VisualObject ()
 
void triggerDeSel ()
 
void triggerRightClick (const EventInfo *)
 
void triggerSel ()
 
- Protected Member Functions inherited from visBase::DataObject
 DataObject ()
 
void doAddNodeState (NodeState *ns)
 
virtual osg::StateSet * getStateSet ()
 
template<class T >
T * setOsgNode (T *t)
 Must be called during construction. More...
 
void updateNodemask ()
 
- Protected Member Functions inherited from NamedCallBacker
void sendDelNotif () const
 

Protected Attributes

RefMan< TextureChannels > channels_
 
BindType colorbindtype_
 
Coordinates * coords_
 
osg::Geode * geode_
 
bool isredrawing_
 
Threads::Lock lock_
 
bool needstextureupdate_
 
osg::Node * node_
 
NodeCallbackHandler * nodecallbackhandler_
 
BindType normalbindtype_
 
Normals * normals_
 
osg::Geometry * osggeom_
 
ObjectSet< Geometry::PrimitiveSet > primitivesets_
 
Geometry::PrimitiveSet::PrimitiveType primitivetype_
 
Threads::Lock redrawlock_
 
TextureCallbackHandler * texturecallbackhandler_
 
TextureCoords * texturecoords_
 
bool usecoordinateschangedcb_
 
bool useosgsmoothnormal_
 
- Protected Attributes inherited from visBase::Shape
Material * material_
 
- Protected Attributes inherited from visBase::DataObject
DataObjectGroup * parent_
 
- Protected Attributes inherited from NamedCallBacker
Threads::Atomic< bool > delalreadytriggered_
 
Notifier< NamedCallBacker > delnotif_
 
- Protected Attributes inherited from NamedObject
BufferString name_
 

Private Member Functions

 VertexShape (const VertexShape &)
 
VertexShape & operator= (const VertexShape &)
 

Static Private Member Functions

static visBase::DataObject * createInternal ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from visBase::Shape
static const char * sKeyMaterial ()
 
static const char * sKeyOnOff ()
 
static const char * sKeyTexture ()
 

Detailed Description

<>

Member Enumeration Documentation

◆ BindType

Enumerator
BIND_OFF 
BIND_OVERALL 
BIND_PER_PRIMITIVE_SET 
BIND_PER_PRIMITIVE 
BIND_PER_VERTEX 

Constructor & Destructor Documentation

◆ VertexShape() [1/3]

visBase::VertexShape::VertexShape ( const VertexShape &  )
private

◆ VertexShape() [2/3]

visBase::VertexShape::VertexShape ( )

◆ VertexShape() [3/3]

visBase::VertexShape::VertexShape ( Geometry::PrimitiveSet::PrimitiveType  ,
bool  creategeode 
)
protected

◆ ~VertexShape()

visBase::VertexShape::~VertexShape ( )
protected

Member Function Documentation

◆ addPrimitiveSet()

void visBase::VertexShape::addPrimitiveSet ( Geometry::PrimitiveSet *  )

◆ addPrimitiveSetToScene()

virtual void visBase::VertexShape::addPrimitiveSetToScene ( osg::PrimitiveSet *  )
protectedvirtual

Reimplemented in visBase::PolyLine3D.

◆ coordinatesChangedCB()

void visBase::VertexShape::coordinatesChangedCB ( CallBacker *  )

◆ create()

static VertexShape* visBase::VertexShape::create ( )
inlinestatic

◆ createInternal()

static visBase::DataObject* visBase::VertexShape::createInternal ( )
inlinestaticprivate

◆ dirtyCoordinates()

void visBase::VertexShape::dirtyCoordinates ( )

◆ enableCoordinatesChangedCB()

void visBase::VertexShape::enableCoordinatesChangedCB ( bool  yn)
inline

◆ forceRedraw()

void visBase::VertexShape::forceRedraw ( bool  = true)

◆ getClassName()

virtual const char* visBase::VertexShape::getClassName ( ) const
virtual

◆ getCoordinates() [1/2]

virtual Coordinates* visBase::VertexShape::getCoordinates ( )
inlinevirtual

◆ getCoordinates() [2/2]

virtual const Coordinates* visBase::VertexShape::getCoordinates ( ) const
inlinevirtual

◆ getDisplayTransformation()

const visBase::Transformation* visBase::VertexShape::getDisplayTransformation ( ) const
virtual
Note
Direcly relayed to the coordinates

Reimplemented from visBase::DataObject.

◆ getNormalBindType()

int visBase::VertexShape::getNormalBindType ( )

◆ getNormals() [1/2]

Normals* visBase::VertexShape::getNormals ( )
inline

◆ getNormals() [2/2]

const Normals* visBase::VertexShape::getNormals ( ) const
inline

◆ getOsgNormal()

Coord3 visBase::VertexShape::getOsgNormal ( int  ) const

◆ getPrimitiveSet()

Geometry::PrimitiveSet* visBase::VertexShape::getPrimitiveSet ( int  )

◆ getStaticClassName()

static const char* visBase::VertexShape::getStaticClassName ( )
static

◆ getTextureCoords() [1/2]

TextureCoords* visBase::VertexShape::getTextureCoords ( )
inline

◆ getTextureCoords() [2/2]

const TextureCoords* visBase::VertexShape::getTextureCoords ( ) const
inline

◆ getTextureData()

const unsigned char* visBase::VertexShape::getTextureData ( int &  ,
int &  ,
int &   
) const

◆ gtNormals()

Normals* visBase::VertexShape::gtNormals ( ) const
protected

◆ gtTextureCoords()

TextureCoords* visBase::VertexShape::gtTextureCoords ( ) const
protected

◆ initClass()

static void visBase::VertexShape::initClass ( )
static

◆ materialChangeCB()

void visBase::VertexShape::materialChangeCB ( CallBacker *  )

◆ nrPrimitiveSets()

int visBase::VertexShape::nrPrimitiveSets ( ) const

◆ operator=()

VertexShape& visBase::VertexShape::operator= ( const VertexShape &  )
private

◆ removeAllPrimitiveSets()

void visBase::VertexShape::removeAllPrimitiveSets ( )

◆ removePrimitiveSet()

void visBase::VertexShape::removePrimitiveSet ( const Geometry::PrimitiveSet *  )

◆ removePrimitiveSetFromScene()

virtual void visBase::VertexShape::removePrimitiveSetFromScene ( const osg::PrimitiveSet *  )
protectedvirtual

Reimplemented in visBase::PolyLine3D.

◆ removeSwitch()

void visBase::VertexShape::removeSwitch ( )

Will turn the object permanently on.

Note
Must be done before giving away the SoNode with getInventorNode() to take effect.

◆ setAttribAndMode()

void visBase::VertexShape::setAttribAndMode ( osg::StateAttribute *  )

◆ setColorBindType()

void visBase::VertexShape::setColorBindType ( BindType  )

◆ setCoordinates()

virtual void visBase::VertexShape::setCoordinates ( Coordinates *  coords)
virtual

Reimplemented in visBase::PolyLine3D.

◆ setDisplayTransformation()

virtual void visBase::VertexShape::setDisplayTransformation ( const visBase::Transformation *  )
virtual
Note
The transformation is forwarded to the the coordinates, if you change coordinates, you will have to setTransformation again.

Reimplemented from visBase::DataObject.

Reimplemented in visBase::PolyLine3D, visBase::PolyLine, and visBase::PointSet.

◆ setLineStyle()

virtual void visBase::VertexShape::setLineStyle ( const OD::LineStyle &  )
inlinevirtual

Reimplemented in visBase::PolyLine3D, and visBase::PolyLine.

◆ setMaterial()

void visBase::VertexShape::setMaterial ( Material *  mt)
virtual

Reimplemented from visBase::Shape.

◆ setNormalBindType()

void visBase::VertexShape::setNormalBindType ( BindType  )

◆ setNormals()

void visBase::VertexShape::setNormals ( Normals *  )

◆ setPrimitiveType()

void visBase::VertexShape::setPrimitiveType ( Geometry::PrimitiveSet::PrimitiveType  )

Should be called before adding statesets.

◆ setTextureChannels()

void visBase::VertexShape::setTextureChannels ( TextureChannels *  )

◆ setTextureCoords()

void visBase::VertexShape::setTextureCoords ( TextureCoords *  )

◆ setUpdateVar()

void visBase::VertexShape::setUpdateVar ( bool &  var,
bool  yn 
)
protected

Will trigger redraw request if necessary.

◆ setupOsgNode()

void visBase::VertexShape::setupOsgNode ( )
protected

◆ sFactoryKeyword()

static const char* visBase::VertexShape::sFactoryKeyword ( )
static

◆ touchPrimitiveSet()

virtual void visBase::VertexShape::touchPrimitiveSet ( int  )
inlinevirtual

Reimplemented in visBase::PolyLine3D.

◆ updatePartialGeometry()

void visBase::VertexShape::updatePartialGeometry ( Interval< int >  )

◆ useOsgAutoNormalComputation() [1/2]

bool visBase::VertexShape::useOsgAutoNormalComputation ( ) const
inline

◆ useOsgAutoNormalComputation() [2/2]

void visBase::VertexShape::useOsgAutoNormalComputation ( bool  )

◆ useVertexBufferRender()

void visBase::VertexShape::useVertexBufferRender ( bool  yn)

If yn=true, osg use vertex buffer to render and ignore displaylist false, osg use display list to render.

Member Data Documentation

◆ channels_

RefMan<TextureChannels> visBase::VertexShape::channels_
protected

◆ colorbindtype_

BindType visBase::VertexShape::colorbindtype_
protected

◆ coords_

Coordinates* visBase::VertexShape::coords_
protected

◆ geode_

osg::Geode* visBase::VertexShape::geode_
protected

◆ isredrawing_

bool visBase::VertexShape::isredrawing_
protected

◆ lock_

Threads::Lock visBase::VertexShape::lock_
protected

lock protects primitiveset and osg color array

◆ needstextureupdate_

bool visBase::VertexShape::needstextureupdate_
protected

◆ node_

osg::Node* visBase::VertexShape::node_
protected

◆ nodecallbackhandler_

NodeCallbackHandler* visBase::VertexShape::nodecallbackhandler_
protected

◆ normalbindtype_

BindType visBase::VertexShape::normalbindtype_
protected

◆ normals_

Normals* visBase::VertexShape::normals_
protected

◆ osggeom_

osg::Geometry* visBase::VertexShape::osggeom_
protected

◆ primitivesets_

ObjectSet<Geometry::PrimitiveSet> visBase::VertexShape::primitivesets_
protected

◆ primitivetype_

Geometry::PrimitiveSet::PrimitiveType visBase::VertexShape::primitivetype_
protected

◆ redrawlock_

Threads::Lock visBase::VertexShape::redrawlock_
protected

◆ texturecallbackhandler_

TextureCallbackHandler* visBase::VertexShape::texturecallbackhandler_
protected

◆ texturecoords_

TextureCoords* visBase::VertexShape::texturecoords_
protected

◆ usecoordinateschangedcb_

bool visBase::VertexShape::usecoordinateschangedcb_
protected

◆ useosgsmoothnormal_

bool visBase::VertexShape::useosgsmoothnormal_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2022