| java.lang.Object javax.media.j3d.SceneGraphObject javax.media.j3d.Node javax.media.j3d.Group org.jdesktop.j3dfly.utils.environment.geometry.Primitive
All known Subclasses: org.jdesktop.j3dfly.utils.environment.geometry.SkyDome,
Primitive | abstract public class Primitive extends Group (Code) | | Base class for all Java 3D primitives.
|
Constructor Summary | |
public | Primitive() Constructs a default primitive. |
Method Summary | |
protected void | cacheGeometry(int kind, float a, float b, float c, int d, int e, int flags, GeomBuffer geo) | public Appearance | getAppearance() Gets the appearance of the primitive (defaults to first subpart). | protected GeomBuffer | getCachedGeometry(int kind, float a, float b, float c, int d, int e, int flags) | public int | getNumTriangles() Returns total number of triangles in this primitive. | public int | getNumVertices() Returns total number of vertices in this primitive. | public int | getPrimitiveFlags() Returns the flags of primitive (generate normal, textures, caching, etc). | abstract public Shape3D | getShape(int partid) Obtains a shape node of a subpart of the primitive. | public void | setAppearance(int partid, Appearance ap) Sets the appearance of a subpart given a partid. | abstract public void | setAppearance(Appearance ap) Sets the main appearance of the primitive (all subparts) to
same appearance. | public void | setAppearance() Sets the main appearance of the primitive (all subparts) to
a default white appearance. | public void | setNumTriangles(int num) Sets the total number of triangles in this primitive. | public void | setNumVertices(int num) Sets total number of vertices in this primitive. | public void | setPrimitiveFlags(int fl) | String | strfloat(float x) |
CONE | final static int CONE(Code) | | |
CYLINDER | final static int CYLINDER(Code) | | |
ENABLE_APPEARANCE_MODIFY | final public static int ENABLE_APPEARANCE_MODIFY(Code) | | Specifies that the ALLOW_APPEARANCE_READ and
ALLOW_APPEARANCE_WRITE bits are to be set on the generated
geometry's Shape3D nodes.
|
ENABLE_GEOMETRY_PICKING | final public static int ENABLE_GEOMETRY_PICKING(Code) | | Specifies that the ALLOW_INTERSECT
capability bit should be set on the generated geometry.
This allows the object
to be picked using Geometry based picking.
|
GENERATE_COLOR_3 | final public static int GENERATE_COLOR_3(Code) | | |
GENERATE_NORMALS | final public static int GENERATE_NORMALS(Code) | | Specifies that normals are generated along with the positions.
|
GENERATE_NORMALS_INWARD | final public static int GENERATE_NORMALS_INWARD(Code) | | Specifies that normals are to be flipped along the surface.
|
GENERATE_TEXTURE_COORDS | final public static int GENERATE_TEXTURE_COORDS(Code) | | Specifies that texture coordinates are generated along with the
positions.
|
GEOMETRY_NOT_SHARED | final public static int GEOMETRY_NOT_SHARED(Code) | | Specifies that the geometry being created will not be shared by
another scene graph node. By default all primitives created with
the same parameters share their geometry (you have 50 spheres in
your scene, but the geometry stored only once). A change to one
primitive will effect all shared nodes.
You specify this flag if you do not wish to share any geometry
among primitives of the same parameters.
|
SPHERE | final static int SPHERE(Code) | | |
flags | int flags(Code) | | Primitive flags.
|
Primitive | public Primitive()(Code) | | Constructs a default primitive.
|
cacheGeometry | protected void cacheGeometry(int kind, float a, float b, float c, int d, int e, int flags, GeomBuffer geo)(Code) | | |
getAppearance | public Appearance getAppearance()(Code) | | Gets the appearance of the primitive (defaults to first subpart).
|
getCachedGeometry | protected GeomBuffer getCachedGeometry(int kind, float a, float b, float c, int d, int e, int flags)(Code) | | |
getNumTriangles | public int getNumTriangles()(Code) | | Returns total number of triangles in this primitive.
|
getNumVertices | public int getNumVertices()(Code) | | Returns total number of vertices in this primitive.
|
getPrimitiveFlags | public int getPrimitiveFlags()(Code) | | Returns the flags of primitive (generate normal, textures, caching, etc).
|
getShape | abstract public Shape3D getShape(int partid)(Code) | | Obtains a shape node of a subpart of the primitive.
Parameters: partid - identifier for a given subpart of the primitive. |
setAppearance | public void setAppearance(int partid, Appearance ap)(Code) | | Sets the appearance of a subpart given a partid.
|
setAppearance | abstract public void setAppearance(Appearance ap)(Code) | | Sets the main appearance of the primitive (all subparts) to
same appearance.
|
setAppearance | public void setAppearance()(Code) | | Sets the main appearance of the primitive (all subparts) to
a default white appearance.
|
setNumTriangles | public void setNumTriangles(int num)(Code) | | Sets the total number of triangles in this primitive.
|
setNumVertices | public void setNumVertices(int num)(Code) | | Sets total number of vertices in this primitive.
|
setPrimitiveFlags | public void setPrimitiveFlags(int fl)(Code) | | |
|
|