osg.Drawable

class osg.Drawable
Represents

c++ class

Wraps

osg::Drawable

Bases

osg.Node

Methods:

:asGeometry()

Тип результата

osg.Geometry

:getOrCreateStateSet()

Тип результата

osg.StateSet

:getStateSet()

Тип результата

osg.StateSet

:setStateSet(osg.StateSet ss)

Параметры

ss (osg.StateSet) –

:removeStateSet()

:setUseDisplayList(bool b)

Параметры

b (bool) – When set to true, force the draw method to use OpenGL Display List for rendering. If false, rendering directly. If the display list has not been compiled already, the next call to draw will automatically create the display list.

:getUseDisplayList()

Return whether OpenGL display lists are being used for rendering.

Тип результата

bool

:setUseVertexBufferObjects(bool b)

Параметры

b (bool) – When set to true, ignore the osg.Drawable.setUseDisplayList() settings, and hints to the drawImplementation() method to use OpenGL vertex buffer objects for rendering.

:getUseVertexBufferObjects()

Return whether OpenGL vertex buffer objects should be used when supported by OpenGL driver.

Тип результата

bool

:setUseVertexArrayObject(bool b)

Set whether to use a local VertexArrayObject for this Drawable.

Параметры

b (bool) –

:getUseVertexArrayObject()

Return whether to use a local VertexArrayObject for this Drawable.

Тип результата

bool

:dirtyDisplayList()

Deprecated, use osg.Drawable.dirtyGLObjects() instead.

:dirtyGLObjects()

Force a recompile on next osg.Drawable.draw() of any OpenGL objects associated with this geoset.

:getGLObjectSizeHint()

Return the estimated size of GLObjects (display lists/vertex buffer objects) that are associated with this drawable. This size is used a hint for reuse of deleted display lists/vertex buffer objects.

Тип результата

unsigned

:getNumParents()

Тип результата

unsigned

:getParent(unsigned i)

Параметры

i (unsigned) –

Тип результата

osg.Node

:getInitialBound()

Get the initial bounding volume to use when computing the overall bounding volume.

Тип результата

osg.BoundingBox

:setInitialBound(osg.BoundingBox bound)

Set the initial bounding volume to use when computing the overall bounding volume.

Параметры

bound (osg.BoundingBox) –

:getBoundingBox()

Get BoundingBox of Drawable. If the BoundingBox is not up to date then its updated via an internal call to osg.Drawable.computeBound().

Тип результата

osg.BoundingBox

:computeBoundingBox()

Compute the bounding box around Drawables’s geometry.

Тип результата

osg.BoundingBox

:setShape(osg.Shape shape)

Set the Shape of the Drawable. The shape can be used to speed up collision detection or as a guide for procedural geometry generation.

Параметры

shape (osg.Shape) –

:getShape()

Get the Shape of the Drawable

Тип результата

osg.Shape