net.dzzd.access
Interface IFace3D


public interface IFace3D

Used for accessing to a Face3D.

Since:
1.0
Version:
1.0, 01/01/04
Author:
Bruno Augier
See Also:
IMesh3D

Method Summary
 void flipNormal()
          Flip normal (reverse face vertices order).
 int getId()
          Gets the id.
 float getMappingU(int numVertex)
          Gets U mapping value for selected vertex.
 float getMappingV(int numVertex)
          Gets V mapping value for selected vertex.
 IMaterial getMaterial()
          Gets this face material.
 IMesh3D getMesh3D()
           
 double getPA()
          Gets the "a" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on.
 double getPB()
          Gets the "b" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on.
 double getPC()
          Gets the "c" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on.
 double getPD()
          Gets the "d" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on.
 double getSphereBox()
          Gets the radius of the surrounding sphere for this face relative to third vertex.
 IVertex3D getVertex3D0()
          Gets interface the first vertex of this face.
 float getVertex3D0Nx()
          Gets Vertex3D normal component.
 float getVertex3D0Ny()
          Gets Vertex3D normal component.
 float getVertex3D0Nz()
          Gets Vertex3D normal component.
 IVertex3D getVertex3D1()
          Gets interface the second vertex of this face.
 float getVertex3D1Nx()
          Gets Vertex3D normal component.
 float getVertex3D1Ny()
          Gets Vertex3D normal component.
 float getVertex3D1Nz()
          Gets Vertex3D normal component.
 IVertex3D getVertex3D2()
          Gets interface the third vertex of this face.
 float getVertex3D2Nx()
          Gets Vertex3D normal component.
 float getVertex3D2Ny()
          Gets Vertex3D normal component.
 float getVertex3D2Nz()
          Gets Vertex3D normal component.
 void setMappingU(int numVertex, float val)
          Sets U mapping value for selected vertex.
 void setMappingV(int numVertex, float val)
          Sets V mapping value for selected vertex.
 void setMaterial(IMaterial material)
          Sets this face material.
 

Method Detail

getMaterial

public IMaterial getMaterial()
Gets this face material.

Returns:
current face material or null if none

setMaterial

public void setMaterial(IMaterial material)
Sets this face material.

Parameters:
material - new material or null to remove

getVertex3D0

public IVertex3D getVertex3D0()
Gets interface the first vertex of this face.

Returns:
interface to access vertex

getVertex3D1

public IVertex3D getVertex3D1()
Gets interface the second vertex of this face.

Returns:
interface to access vertex0

getVertex3D2

public IVertex3D getVertex3D2()
Gets interface the third vertex of this face.

Returns:
interface to access vertex0

getMappingU

public float getMappingU(int numVertex)
Gets U mapping value for selected vertex. if param numVertex is out of the range 0-2 than 0 is returned

Parameters:
numVertex - vertex mapping coordinate to return
Returns:
U mapping coordinate for selected vertex

getMappingV

public float getMappingV(int numVertex)
Gets V mapping value for selected vertex. if param numVertex is out of the range 0-2 than 0 is returned

Parameters:
numVertex - vertex mapping coordinate to return
Returns:
V mapping coordinate for selected vertex

setMappingU

public void setMappingU(int numVertex,
                        float val)
Sets U mapping value for selected vertex. if param numVertex is out of the range 0-2 than it will return immediatly without doing anything

Parameters:
numVertex - vertex mapping coordinate to change
val - new U mapping coordinate for selected vertex

setMappingV

public void setMappingV(int numVertex,
                        float val)
Sets V mapping value for selected vertex. if param numVertex is out of the range 0-2 than it will return immediatly without doing anything

Parameters:
numVertex - vertex mapping coordinate to change
val - new V mapping coordinate for selected vertex

getPA

public double getPA()
Gets the "a" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on. The returned parameter is relative to object space.

Returns:
equation parameter value

getPB

public double getPB()
Gets the "b" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on. The returned parameter is relative to object space.

Returns:
equation parameter value

getPC

public double getPC()
Gets the "c" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on. The returned parameter is relative to object space.

Returns:
equation parameter value

getPD

public double getPD()
Gets the "d" parameter of the equation (a*x+b*y+c*z+d=0) for the plane that face lie on. The returned parameter is relative to object space.

Returns:
equation parameter value

getSphereBox

public double getSphereBox()
Gets the radius of the surrounding sphere for this face relative to third vertex. This parameter is relative to object space.

Returns:
equation parameter value

flipNormal

public void flipNormal()
Flip normal (reverse face vertices order).


getId

public int getId()
Gets the id.

Returns:
id of this face

getVertex3D0Nx

public float getVertex3D0Nx()
Gets Vertex3D normal component.

Returns:
x component for vertex 0 normal

getVertex3D0Ny

public float getVertex3D0Ny()
Gets Vertex3D normal component.

Returns:
y component for vertex 0 normal

getVertex3D0Nz

public float getVertex3D0Nz()
Gets Vertex3D normal component.

Returns:
z component for vertex 0 normal

getVertex3D1Nx

public float getVertex3D1Nx()
Gets Vertex3D normal component.

Returns:
x component for vertex 1 normal

getVertex3D1Ny

public float getVertex3D1Ny()
Gets Vertex3D normal component.

Returns:
y component for vertex 1 normal

getVertex3D1Nz

public float getVertex3D1Nz()
Gets Vertex3D normal component.

Returns:
z component for vertex 1 normal

getVertex3D2Nx

public float getVertex3D2Nx()
Gets Vertex3D normal component.

Returns:
x component for vertex 2 normal

getVertex3D2Ny

public float getVertex3D2Ny()
Gets Vertex3D normal component.

Returns:
y component for vertex 2 normal

getVertex3D2Nz

public float getVertex3D2Nz()
Gets Vertex3D normal component.

Returns:
z component for vertex 2 normal

getMesh3D

public IMesh3D getMesh3D()