public abstract class Primitive
extends org.jogamp.java3d.Group
Modifier and Type | Field and Description |
---|---|
static int |
ENABLE_APPEARANCE_MODIFY
Specifies that the ALLOW_APPEARANCE_READ and
ALLOW_APPEARANCE_WRITE bits are to be set on the generated
geometry's Shape3D nodes.
|
static int |
ENABLE_GEOMETRY_PICKING
Specifies that the ALLOW_INTERSECT
capability bit should be set on the generated geometry.
|
static int |
GENERATE_NORMALS
Specifies that normals are generated along with the positions.
|
static int |
GENERATE_NORMALS_INWARD
Specifies that normals are to be flipped along the surface.
|
static int |
GENERATE_TEXTURE_COORDS
Specifies that texture coordinates are generated along with the
positions.
|
static int |
GENERATE_TEXTURE_COORDS_Y_UP
Specifies that texture coordinates are to be Y up.
|
static int |
GEOMETRY_NOT_SHARED
Specifies that the geometry being created will not be shared by
another scene graph node.
|
ALLOW_CHILDREN_EXTEND, ALLOW_CHILDREN_READ, ALLOW_CHILDREN_WRITE, ALLOW_COLLISION_BOUNDS_READ, ALLOW_COLLISION_BOUNDS_WRITE
ALLOW_AUTO_COMPUTE_BOUNDS_READ, ALLOW_AUTO_COMPUTE_BOUNDS_WRITE, ALLOW_BOUNDS_READ, ALLOW_BOUNDS_WRITE, ALLOW_COLLIDABLE_READ, ALLOW_COLLIDABLE_WRITE, ALLOW_LOCAL_TO_VWORLD_READ, ALLOW_LOCALE_READ, ALLOW_PARENT_READ, ALLOW_PICKABLE_READ, ALLOW_PICKABLE_WRITE, ENABLE_COLLISION_REPORTING, ENABLE_PICK_REPORTING
Constructor and Description |
---|
Primitive()
Constructs a default primitive.
|
Modifier and Type | Method and Description |
---|---|
static void |
clearGeometryCache()
Clear the shared geometry cache for all Primitive types.
|
org.jogamp.java3d.Appearance |
getAppearance()
Gets the appearance of the primitive (defaults to first subpart).
|
abstract org.jogamp.java3d.Appearance |
getAppearance(int partId)
Gets the appearance of the specified part of the primitive.
|
int |
getNumTriangles()
Returns the total number of triangles in this primitive.
|
int |
getNumVertices()
Returns the total number of vertices in this primitive.
|
int |
getPrimitiveFlags()
Returns the flags of primitive (generate normal, textures, caching, etc).
|
abstract org.jogamp.java3d.Shape3D |
getShape(int partid)
Obtains a shape node of a subpart of the primitive.
|
void |
setAppearance()
Sets the main appearance of the primitive (all subparts) to
a default white appearance.
|
abstract void |
setAppearance(org.jogamp.java3d.Appearance ap)
Sets the main appearance of the primitive (all subparts) to
same appearance.
|
void |
setAppearance(int partid,
org.jogamp.java3d.Appearance ap)
Sets the appearance of a subpart given a partid.
|
void |
setNumTriangles(int num)
Deprecated.
The number of triangles is an immutable attribute.
|
void |
setNumVertices(int num)
Deprecated.
The number of vertices is an immutable attribute.
|
void |
setPrimitiveFlags(int fl)
Deprecated.
The primitive flags must be set at construction time
via one of the subclass constructors.
|
addChild, cloneNode, getAllChildren, getAlternateCollisionTarget, getChild, getCollisionBounds, indexOfChild, insertChild, moveTo, numChildren, removeAllChildren, removeChild, removeChild, setAlternateCollisionTarget, setChild, setCollisionBounds
cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, cloneTree, duplicateNode, getBounds, getBoundsAutoCompute, getCollidable, getLocale, getLocalToVworld, getLocalToVworld, getParent, getPickable, setBounds, setBoundsAutoCompute, setCollidable, setPickable
public static final int GENERATE_NORMALS
public static final int GENERATE_TEXTURE_COORDS
public static final int GENERATE_NORMALS_INWARD
public static final int GENERATE_TEXTURE_COORDS_Y_UP
public static final int GEOMETRY_NOT_SHARED
public static final int ENABLE_GEOMETRY_PICKING
public static final int ENABLE_APPEARANCE_MODIFY
public int getNumTriangles()
public void setNumTriangles(int num)
public int getNumVertices()
public void setNumVertices(int num)
public int getPrimitiveFlags()
public void setPrimitiveFlags(int fl)
public abstract org.jogamp.java3d.Shape3D getShape(int partid)
partid
- identifier for a given subpart of the primitive.public org.jogamp.java3d.Appearance getAppearance()
public abstract org.jogamp.java3d.Appearance getAppearance(int partId)
partId
- identifier for a given subpart of the primitivepublic void setAppearance(int partid, org.jogamp.java3d.Appearance ap)
public abstract void setAppearance(org.jogamp.java3d.Appearance ap)
public void setAppearance()
public static void clearGeometryCache()