com.sygem.jazz3d3
Class Vertex

java.lang.Object
  extended bycom.sygem.jazz3d3.Vertex

public class Vertex
extends java.lang.Object

The vertex class holds various useful bits of information about points in the Jazz3D universe.

The user should never need to create a Vertex object, but may be given them by methods from the Object3d class (like getCenter).

Version:
3.0a
See Also:
Object3d.getCenter()

Field Summary
 float cx
           
 float cy
           
 float cz
           
 boolean double_sided
           
 float screenx
           
 float screeny
           
static int UV_MULTIPLIER
           
 
Constructor Summary
Vertex()
          Default constructor.
Vertex(double xa, double ya, double za)
          Create a vertex at position (x,y,z)
Vertex(float xa, float ya, float za)
          Create a vertex at position (x,y,z)
Vertex(Vertex v)
           
 
Method Summary
 float getFloatX()
           
 float getFloatY()
           
 float getFloatZ()
           
 double getU()
           
 double getV()
           
 Vertex getVertexNormal()
          Returns the normal vector for this vertex.
 double getX()
          Returns the X component of the vertex.
 double getY()
          Returns the Y component of the vertex.
 double getZ()
          Returns the Z component of the vertex.
 void set(double newx, double newy, double newz)
          Set the position of this vertex.
 void set(Vertex v)
          Set the position of this vertex to be the same as another.
 void setUV(double u, double v)
          Set the UV coordinates of a Vertex.
 void setVertexNormal(Vertex norm)
          Set the normal vector for this vertex.
 void setX(double newx)
          Set the X component of the vertex.
 void setY(double newy)
          Set the Y component of the vertex.
 void setZ(double newz)
          Set the Z component of the vertex.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cx

public float cx

cy

public float cy

cz

public float cz

double_sided

public boolean double_sided

screenx

public float screenx

screeny

public float screeny

UV_MULTIPLIER

public static final int UV_MULTIPLIER
See Also:
Constant Field Values
Constructor Detail

Vertex

public Vertex()
Default constructor. Constructs a Vertex at position (0,0,0)


Vertex

public Vertex(double xa,
              double ya,
              double za)
Create a vertex at position (x,y,z)

Parameters:
xa - The x coordinate of the vertex
ya - The y coordinate of the vertex
za - The z coordinate of the vertex

Vertex

public Vertex(float xa,
              float ya,
              float za)
Create a vertex at position (x,y,z)

Parameters:
xa - The x coordinate of the vertex
ya - The y coordinate of the vertex
za - The z coordinate of the vertex

Vertex

public Vertex(Vertex v)
Method Detail

getFloatX

public final float getFloatX()

getFloatY

public final float getFloatY()

getFloatZ

public final float getFloatZ()

getU

public final double getU()

getV

public final double getV()

getVertexNormal

public final Vertex getVertexNormal()
Returns the normal vector for this vertex. The normal is actually returned as a Vertex.

See Also:
setVertexNormal(com.sygem.jazz3d3.Vertex)

getX

public final double getX()
Returns the X component of the vertex.


getY

public final double getY()
Returns the Y component of the vertex.


getZ

public final double getZ()
Returns the Z component of the vertex.


set

public final void set(double newx,
                      double newy,
                      double newz)
Set the position of this vertex.

Parameters:
newx - The new X component
newy - The new Y component
newz - The new Z component

set

public final void set(Vertex v)
Set the position of this vertex to be the same as another. Performs a deep-copy.

Parameters:
v - A vertex to set the current values from.

setUV

public final void setUV(double u,
                        double v)
Set the UV coordinates of a Vertex.


setVertexNormal

public final void setVertexNormal(Vertex norm)
Set the normal vector for this vertex. The normal is actually represented by a Vertex.

Parameters:
norm - The new vertex normal
See Also:
getVertexNormal()

setX

public final void setX(double newx)
Set the X component of the vertex.

Parameters:
newx - The new X component

setY

public final void setY(double newy)
Set the Y component of the vertex.

Parameters:
newy - The new Y component

setZ

public final void setZ(double newz)
Set the Z component of the vertex.

Parameters:
newz - The new Z component


Copyright © 1999-2006 SyGem Software. All Rights Reserved.