|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.smurn.jply.ElementType
public final class ElementType
Declaration of an element type.
Each element in a PLY file has a type. The type defines what values (properties) the element has.
Some element types are described in the PLY specification and should only be used accordingly to ensure best compatibility with other PLY applications.
vertex
vertex
type should have
at least three (non-list) properties named x
, y
and z
for the position of the vertex. red
, green
,
blue
(non-list) properties to define the color of a vertex.material_index
property
(of an integer type). The value of that property is a (zero-based) index
to an element of type material
(see below).face
face
type should have
at least one list-property called vertex_index
, storing a list
of (zero-based) indicies into the vertex
elements.edge
edge
type should
have at least two (non-list) properties vertex1
and vertex2
,
storing a (zero-based) index into the vertex
elements defining
the start and end point of the edge.material
material_index
property.ambient_red
ambient_green
ambient_blue
ambient_coeff
diffuse_red
diffuse_green
diffuse_blue
diffuse_coeff
specular_red
specular_green
specular_blue
specular_coeff
specular_power
float
for all
properties but indices where it should be int
and color components
where it should be uchar
.
All instances of this class are immutable.
Constructor Summary | |
---|---|
ElementType(String name,
List<Property> properties)
Creates an instance. |
|
ElementType(String name,
Property... properties)
Creates an instance. |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
String |
getName()
Gets the name of the element type. |
List<Property> |
getProperties()
Gets all properties defined for this element type. |
int |
hashCode()
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ElementType(String name, List<Property> properties)
name
- Name of the element type.properties
- Properties of the elements of this type.
Must not be null
.
NullPointerException
- if name
or properties
is
null
.
IllegalArgumentException
- if the properties don't have unique
names.public ElementType(String name, Property... properties)
name
- Name of the element type.properties
- Properties of the elements of this type.
NullPointerException
- if name
or properties
is
null
.
IllegalArgumentException
- if the properties don't have unique
names.Method Detail |
---|
public String getName()
Some names are given a specific meaning by the PLY specification and
should only be used accordingly. See ElementType
.
null
or empty,
contains only ASCII characters.public List<Property> getProperties()
null
.public String toString()
toString
in class Object
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |