OpendTect-6_4  6.4
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 Member Functions

 VertexShape ()
 
virtual const char * getClassName () const
 
void setPrimitiveType (Geometry::PrimitiveSet::PrimitiveType)
 Should be called before adding statesets. More...
 
NormalsgetNormals ()
 
const NormalsgetNormals () const
 
void setNormals (Normals *)
 
TextureCoordsgetTextureCoords ()
 
const TextureCoordsgetTextureCoords () const
 
void setTextureCoords (TextureCoords *)
 
virtual void setCoordinates (Coordinates *coords)
 
virtual CoordinatesgetCoordinates ()
 
virtual const CoordinatesgetCoordinates () const
 
virtual void setLineStyle (const OD::LineStyle &)
 
void removeSwitch ()
 
virtual void setDisplayTransformation (const visBase::Transformation *)
 
const visBase::TransformationgetDisplayTransformation () const
 
void dirtyCoordinates ()
 
void addPrimitiveSet (Geometry::PrimitiveSet *)
 
void removePrimitiveSet (const Geometry::PrimitiveSet *)
 
void removeAllPrimitiveSets ()
 
int nrPrimitiveSets () const
 
virtual void touchPrimitiveSet (int)
 
Geometry::PrimitiveSetgetPrimitiveSet (int)
 
void setMaterial (Material *mt)
 
void materialChangeCB (CallBacker *)
 
void coordinatesChangedCB (CallBacker *)
 
void enableCoordinatesChangedCB (bool yn)
 
void useOsgAutoNormalComputation (bool)
 
bool useOsgAutoNormalComputation () const
 
Coord3 getOsgNormal (int) const
 
void setColorBindType (BindType)
 
int getNormalBindType ()
 
void setNormalBindType (BindType)
 
void updatePartialGeometry (Interval< int >)
 
void useVertexBufferRender (bool)
 
void setTextureChannels (TextureChannels *)
 
const unsigned char * getTextureData (int &, int &, int &) const
 
void forceRedraw (bool=true)
 
void setAttribAndMode (osg::StateAttribute *)
 
- Public Member Functions inherited from visBase::Shape
MaterialgetMaterial ()
 
const MaterialgetMaterial () const
 
void setMaterialBinding (int)
 
int getMaterialBinding () const
 
void setRenderMode (RenderMode)
 
void enableRenderLighting (bool)
 
int usePar (const IOPar &)
 osg default render lighting is on More...
 
void fillPar (IOPar &) const
 
- Public Member Functions inherited from visBase::VisualObject
virtual bool getBoundingBox (Coord3 &min, Coord3 &max) const
 
virtual void setSceneEventCatcher (EventCatcher *)
 
void setSelectable (bool yn)
 
bool selectable () const
 
NotifierAccessselection ()
 
NotifierAccessdeSelection ()
 
virtual NotifierAccessrightClicked ()
 
const EventInforightClickedEventInfo () const
 
const TypeSet< int > * rightClickedPath () const
 
- Public Member Functions inherited from visBase::DataObject
virtual bool isOK () const
 
int id () const
 
void setID (int nid)
 
uiString name () const
 
virtual void setName (const uiString &)
 
osg::Node * osgNode (bool skipswitch=false)
 
const osg::Node * osgNode (bool skipswitch=false) const
 
void enableTraversal (unsigned int mask, bool yn=true)
 
bool isTraversalEnabled (unsigned int mask) const
 
SoNode * getInventorNode ()
 
const SoNode * getInventorNode () const
 
virtual bool turnOn (bool yn)
 
virtual bool isOn () const
 
bool isPickable (bool actively=true) const
 
void setPickable (bool actively, bool passively=true)
 
virtual bool rightClickable () const
 
void select () const
 
void deSelect () const
 
void updateSel () const
 
virtual bool isSelected () const
 
virtual void setRightHandSystem (bool yn)
 
virtual bool isRightHandSystem () const
 
virtual void setPixelDensity (float dpi)
 
virtual float getPixelDensity () const
 
virtual const char * errMsg () const
 
bool serialize (const char *filename, bool binary=false)
 
void setParent (DataObjectGroup *g)
 
template<class T >
T * addNodeState (T *ns)
 
NodeStateremoveNodeState (NodeState *)
 
NodeStategetNodeState (int idx)
 
- Public Member Functions inherited from CallBacker
 CallBacker ()
 
 CallBacker (const CallBacker &)
 
virtual ~CallBacker ()
 
bool attachCB (NotifierAccess &, const CallBack &, bool onlyifnew=false)
 
bool attachCB (NotifierAccess *notif, const CallBack &cb, bool onlyifnew=false)
 
void detachCB (NotifierAccess &, const CallBack &)
 
void detachCB (NotifierAccess *notif, const CallBack &cb)
 
bool isNotifierAttached (NotifierAccess *) const
 Only for debugging purposes, don't use. More...
 

Static Public Member Functions

static VertexShapecreate ()
 
static void initClass ()
 
static const char * getStaticClassName ()
 
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 int getID (const osg::Node *)
 
static float getDefaultPixelDensity ()
 
static void setVisualizationThread (const void *)
 Call only once from initialization. More...
 
static bool isVisualizationThread ()
 
static void requestSingleRedraw ()
 
static void setCommonViewer (osgViewer::CompositeViewer *)
 
static osgViewer::CompositeViewer * getCommonViewer ()
 

Protected Member Functions

NormalsgtNormals () const
 
TextureCoordsgtTextureCoords () const
 
 VertexShape (Geometry::PrimitiveSet::PrimitiveType, bool creategeode)
 
 ~VertexShape ()
 
void setupOsgNode ()
 
virtual void addPrimitiveSetToScene (osg::PrimitiveSet *)
 
virtual void removePrimitiveSetFromScene (const osg::PrimitiveSet *)
 
void setUpdateVar (bool &var, bool yn)
 
- Protected Member Functions inherited from visBase::Shape
MaterialgtMaterial () const
 
 Shape ()
 
virtual ~Shape ()
 
- Protected Member Functions inherited from visBase::VisualObject
void triggerSel ()
 
void triggerDeSel ()
 
void triggerRightClick (const EventInfo *)
 
 VisualObject (bool selectable=false)
 
 ~VisualObject ()
 
- Protected Member Functions inherited from visBase::DataObject
virtual osg::StateSet * getStateSet ()
 
void doAddNodeState (NodeState *ns)
 
 DataObject ()
 
template<class T >
T * setOsgNode (T *t)
 Must be called during construction. More...
 
void updateNodemask ()
 
- Protected Member Functions inherited from CallBacker
void detachAllNotifiers ()
 Call from the destructor of your inherited object. More...
 

Protected Attributes

bool needstextureupdate_
 Will trigger redraw request if necessary. More...
 
Normalsnormals_
 
Coordinatescoords_
 
TextureCoordstexturecoords_
 
osg::Node * node_
 
osg::Geode * geode_
 
osg::Geometry * osggeom_
 
bool useosgsmoothnormal_
 
bool usecoordinateschangedcb_
 
BindType colorbindtype_
 
BindType normalbindtype_
 
RefMan< TextureChannelschannels_
 
NodeCallbackHandler * nodecallbackhandler_
 
TextureCallbackHandler * texturecallbackhandler_
 
Threads::Lock redrawlock_
 
bool isredrawing_
 
Geometry::PrimitiveSet::PrimitiveType primitivetype_
 
Threads::Lock lock_
 
ObjectSet< Geometry::PrimitiveSetprimitivesets_
 
- Protected Attributes inherited from visBase::Shape
Materialmaterial_
 
- Protected Attributes inherited from visBase::DataObject
DataObjectGroupparent_
 

Private Member Functions

VertexShapeoperator= (const VertexShape &)
 
 VertexShape (const VertexShape &)
 

Static Private Member Functions

static visBase::DataObjectcreateInternal ()
 

Additional Inherited Members

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

Detailed Description

Member Enumeration Documentation

Enumerator
BIND_OFF 
BIND_OVERALL 
BIND_PER_PRIMITIVE_SET 
BIND_PER_PRIMITIVE 
BIND_PER_VERTEX 

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reimplemented in visBase::PolyLine3D.

void visBase::VertexShape::coordinatesChangedCB ( CallBacker )
static VertexShape* visBase::VertexShape::create ( )
inlinestatic
static visBase::DataObject* visBase::VertexShape::createInternal ( )
inlinestaticprivate
void visBase::VertexShape::dirtyCoordinates ( )
void visBase::VertexShape::enableCoordinatesChangedCB ( bool  yn)
inline
void visBase::VertexShape::forceRedraw ( bool  = true)
virtual const char* visBase::VertexShape::getClassName ( ) const
virtual
virtual Coordinates* visBase::VertexShape::getCoordinates ( )
inlinevirtual
virtual const Coordinates* visBase::VertexShape::getCoordinates ( ) const
inlinevirtual
const visBase::Transformation* visBase::VertexShape::getDisplayTransformation ( ) const
virtual
Note
Direcly relayed to the coordinates

Reimplemented from visBase::DataObject.

int visBase::VertexShape::getNormalBindType ( )
Normals* visBase::VertexShape::getNormals ( )
inline
const Normals* visBase::VertexShape::getNormals ( ) const
inline
Coord3 visBase::VertexShape::getOsgNormal ( int  ) const
Geometry::PrimitiveSet* visBase::VertexShape::getPrimitiveSet ( int  )
static const char* visBase::VertexShape::getStaticClassName ( )
static
TextureCoords* visBase::VertexShape::getTextureCoords ( )
inline
const TextureCoords* visBase::VertexShape::getTextureCoords ( ) const
inline
const unsigned char* visBase::VertexShape::getTextureData ( int &  ,
int &  ,
int &   
) const
Normals* visBase::VertexShape::gtNormals ( ) const
protected
TextureCoords* visBase::VertexShape::gtTextureCoords ( ) const
protected
static void visBase::VertexShape::initClass ( )
static
void visBase::VertexShape::materialChangeCB ( CallBacker )
int visBase::VertexShape::nrPrimitiveSets ( ) const
VertexShape& visBase::VertexShape::operator= ( const VertexShape )
private
void visBase::VertexShape::removeAllPrimitiveSets ( )
void visBase::VertexShape::removePrimitiveSet ( const Geometry::PrimitiveSet )
virtual void visBase::VertexShape::removePrimitiveSetFromScene ( const osg::PrimitiveSet *  )
protectedvirtual

Reimplemented in visBase::PolyLine3D.

void visBase::VertexShape::removeSwitch ( )

Will turn the object permanently on.

Note
Must be done before giving away the SoNode with getInventorNode() to take effect.
void visBase::VertexShape::setAttribAndMode ( osg::StateAttribute *  )
void visBase::VertexShape::setColorBindType ( BindType  )
virtual void visBase::VertexShape::setCoordinates ( Coordinates coords)
virtual

Reimplemented in visBase::PolyLine3D.

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.

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

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

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

Reimplemented from visBase::Shape.

void visBase::VertexShape::setNormalBindType ( BindType  )
void visBase::VertexShape::setNormals ( Normals )
void visBase::VertexShape::setPrimitiveType ( Geometry::PrimitiveSet::PrimitiveType  )

Should be called before adding statesets.

void visBase::VertexShape::setTextureChannels ( TextureChannels )
void visBase::VertexShape::setTextureCoords ( TextureCoords )
void visBase::VertexShape::setUpdateVar ( bool &  var,
bool  yn 
)
protected
void visBase::VertexShape::setupOsgNode ( )
protected
static const char* visBase::VertexShape::sFactoryKeyword ( )
static
virtual void visBase::VertexShape::touchPrimitiveSet ( int  )
inlinevirtual

Reimplemented in visBase::PolyLine3D.

void visBase::VertexShape::updatePartialGeometry ( Interval< int >  )
void visBase::VertexShape::useOsgAutoNormalComputation ( bool  )
bool visBase::VertexShape::useOsgAutoNormalComputation ( ) const
inline
void visBase::VertexShape::useVertexBufferRender ( bool  )

, osg use vertex buffer to render and ignore displaylist false, osg use display list to render.

Member Data Documentation

RefMan<TextureChannels> visBase::VertexShape::channels_
protected
BindType visBase::VertexShape::colorbindtype_
protected
Coordinates* visBase::VertexShape::coords_
protected
osg::Geode* visBase::VertexShape::geode_
protected
bool visBase::VertexShape::isredrawing_
protected
Threads::Lock visBase::VertexShape::lock_
protected

lock protects primitiveset and osg color array

bool visBase::VertexShape::needstextureupdate_
protected

Will trigger redraw request if necessary.

osg::Node* visBase::VertexShape::node_
protected
NodeCallbackHandler* visBase::VertexShape::nodecallbackhandler_
protected
BindType visBase::VertexShape::normalbindtype_
protected
Normals* visBase::VertexShape::normals_
protected
osg::Geometry* visBase::VertexShape::osggeom_
protected
ObjectSet<Geometry::PrimitiveSet> visBase::VertexShape::primitivesets_
protected
Geometry::PrimitiveSet::PrimitiveType visBase::VertexShape::primitivetype_
protected
Threads::Lock visBase::VertexShape::redrawlock_
protected
TextureCallbackHandler* visBase::VertexShape::texturecallbackhandler_
protected
TextureCoords* visBase::VertexShape::texturecoords_
protected
bool visBase::VertexShape::usecoordinateschangedcb_
protected
bool visBase::VertexShape::useosgsmoothnormal_
protected

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