WebGL 3D Object

iv.object

Abstract base class for all objects.

Constructor

.object()

Properties

ref

reference count to this object. Used to mange WebGL resources.

Methods

.clear()

Destroy WebGL resources.
Method is called from default implementation of release method.

.addRef()

Increment reference count

.release()

Decrement reference count

.preRender(node,tm,space,state)

Prepare all information for rendering this object.

.preHitTest(tm,info)

Prepare object for hit testing. Usually object checks object validity, check ray intersection with object bounding box and prepares to triangle testing.

.hitTest(tm,info,org,dir)

Hit test implementation.

 

In this article