o3djs.debug Module Reference
List of all members.
Detailed Description
Defines a namespace for o3djs.debug.
Source
o3djs/debug.js
Public Types
Public Member Functions
|
!o3djs.debug.DebugHelper
|
createDebugHelper(pack, viewInfo)
|
o3djs.debug |
|
!o3d.Shape
|
createLineCube(pack, material, size, opt_matrix)
|
o3djs.debug |
|
!o3djs.debug.VertexInfo
|
createLineCubeVertices(size, opt_matrix)
|
o3djs.debug |
|
!o3d.Shape
|
createLineShape(pack, material, vertices, indices)
|
o3djs.debug |
|
!o3d.Shape
|
createLineSphere(pack, material, radius, subdivisionsAxis, subdivisionsHeight, opt_matrix)
|
o3djs.debug |
|
!o3djs.debug.VertexInfo
|
createLineSphereVertices(radius, subdivisionsAxis, subdivisionsHeight, opt_matrix)
|
o3djs.debug |
|
!o3djs.debug.VertexInfo
|
createVertexInfo(opt_vertices, opt_indices)
|
o3djs.debug |
|
boolean
|
isDebugTransform(transform)
|
o3djs.debug |
Member Function Documentation
Creates a debug helper object.
A debug helper object provides functions to help debug your o3d
application and manages the resources needed to do that for you. For
example it can add axes, spheres and boxes to your transforms as well as
draw lines in 3d space given 2 points.
- Parameters:
-
| pack |
Pack for DebugHelper to manage its resources
with. |
| viewInfo |
ViewInfo for debug
visuals. |
- Returns:
-
!o3djs.debug.DebugHelper.the DebugHelper object.
Creates a cube of lines.
- Parameters:
-
| pack |
Pack to create sphere elements in. |
| material |
to use. |
| size |
Width, height and depth of the cube. |
| opt_matrix |
A matrix by which to multiply all
the vertices. |
- Returns:
-
!o3d.Shape.The created cube.
Creates the vertices and indices for a cube of lines. The
cube will be created around the origin. (-size / 2, size / 2)
The created cube has a position stream only and can therefore only be used
with shaders that support those a position stream.
- Parameters:
-
| size |
Width, height and depth of the cube. |
| opt_matrix |
A matrix by which to multiply all
the vertices. |
- Returns:
-
!o3djs.debug.VertexInfo.The created cube vertices.
Creates a line list shape and primitive given a material, vertex array and
index array.
- Parameters:
-
| pack |
Pack to create objects in. |
| material |
to use. |
| vertices |
array of numbers in the
format positionX, positionY, positionZ. |
| indices |
array of vertex indices, 2 per line. |
- Returns:
-
!o3d.Shape.The created shape.
Creates a sphere.
The created sphere has position, normal, uv and vertex color streams only
and can therefore only be used with shaders that support those 4
streams.
- Parameters:
-
| pack |
Pack to create sphere elements in. |
| material |
to use. |
| radius |
radius of the sphere. |
| subdivisionsAxis |
number of steps around the sphere. |
| subdivisionsHeight |
number of vertically on the sphere. |
| opt_matrix |
A matrix by which to multiply all
the vertices. |
- Returns:
-
!o3d.Shape.The created sphere.
See Also:
Creates sphere vertices.
The created sphere has a position stream only and can therefore only be
used with shaders that support those a position stream.
- Parameters:
-
| radius |
radius of the sphere. |
| subdivisionsAxis |
number of steps around the sphere. |
| subdivisionsHeight |
number of vertically on the sphere. |
| opt_matrix |
A matrix by which to multiply all
the vertices. |
- Returns:
-
!o3djs.debug.VertexInfo.The created sphere vertices.
Creates a new VertexInfo.
- Parameters:
-
| opt_vertices |
array of numbers in the
format positionX, positionY, positionZ. |
| opt_indices |
array of indices, 2 per line. |
- Returns:
-
!o3djs.debug.VertexInfo.The new VertexInfo.
| boolean o3djs.debug.isDebugTransform |
( |
!o3d.Transform |
transform |
) |
|
Checks whether or not a transform is a debug transform.
- Parameters:
-
| transform |
Transform to check. |
- Returns:
-
boolean.true if this transform is a debug transform.
|