com.vwp.vuapi.objects
Class VUPrimitiveObjectInfo

java.lang.Object
  extended by com.vwp.vuapi.util.VUInfo
      extended by com.vwp.vuapi.objects.VUObjectInfo
          extended by com.vwp.vuapi.objects.VUGeneratedObjectInfo
              extended by com.vwp.vuapi.objects.VUPrimitiveObjectInfo
Direct Known Subclasses:
VURotationShapeObjectInfo

public class VUPrimitiveObjectInfo
extends VUGeneratedObjectInfo

This object class is used for all primitives like they are defined by the VU_PRIMITIVE_TYPE_xxx flags.


Field Summary
 int reflectFlags
           
 int type
           
static int VU_PRIMITIVE_REFLECT_INSIDE
          reflection flag: reflect at the inner side of the 3d object
static int VU_PRIMITIVE_REFLECT_NONE
          reflection flag: do not reflect any light at the 3d objects surface
static int VU_PRIMITIVE_REFLECT_OUTSIDE
          reflection flag: reflect at the outer side of the 3d object
static int VU_PRIMITIVE_TYPE_CONE
          primitive object flag for a cone
static int VU_PRIMITIVE_TYPE_CUBE
          primitive object flag for a cube
static int VU_PRIMITIVE_TYPE_CYLINDER
          primitive object flag for a cylinder
static int VU_PRIMITIVE_TYPE_LIQUID_SURFACE
          primitive object flag for a liquid surface object
static int VU_PRIMITIVE_TYPE_SPHERE
          primitive object flag for a sphere
 
Fields inherited from class com.vwp.vuapi.objects.VUGeneratedObjectInfo
color, materialFlags, val1, val2, val3, VU_OBJECT_MATERIAL_GLASS, VU_OBJECT_MATERIAL_MATTE, VU_OBJECT_MATERIAL_METAL, VU_OBJECT_MATERIAL_PLASTIC, VU_OBJECT_MATERIAL_STANDARD, VU_OBJECT_MATERIAL_WATER
 
Fields inherited from class com.vwp.vuapi.objects.VUObjectInfo
angleX, angleY, angleZ, previousID, x, y, z
 
Fields inherited from class com.vwp.vuapi.util.VUInfo
ID, name
 
Constructor Summary
VUPrimitiveObjectInfo(int type, int reflectFlags, int materialFlags, double val1, double val2, double val3, Color color, double x, double y, double z, double angleX, double angleY, double angleZ)
          Constructs a new VUPrimitiveObjectInfo that can be used for putting a new object into a world
VUPrimitiveObjectInfo(long ID, long previousID, int type, double val1, double val2, double val3, Color color, int flags, double x, double y, double z, double angleX, double angleY, double angleZ)
          Constructs a new VUPrimitiveObjectInfo with a known ID.
 
Method Summary
static boolean isPrimitive(int type)
           
 void set(VUPrimitiveObjectInfo oi)
           
 
Methods inherited from class com.vwp.vuapi.objects.VUObjectInfo
set
 
Methods inherited from class com.vwp.vuapi.util.VUInfo
set
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VU_PRIMITIVE_REFLECT_OUTSIDE

public static final int VU_PRIMITIVE_REFLECT_OUTSIDE
reflection flag: reflect at the outer side of the 3d object

See Also:
Constant Field Values

VU_PRIMITIVE_REFLECT_INSIDE

public static final int VU_PRIMITIVE_REFLECT_INSIDE
reflection flag: reflect at the inner side of the 3d object

See Also:
Constant Field Values

VU_PRIMITIVE_REFLECT_NONE

public static final int VU_PRIMITIVE_REFLECT_NONE
reflection flag: do not reflect any light at the 3d objects surface

See Also:
Constant Field Values

VU_PRIMITIVE_TYPE_CUBE

public static final int VU_PRIMITIVE_TYPE_CUBE
primitive object flag for a cube

See Also:
Constant Field Values

VU_PRIMITIVE_TYPE_CONE

public static final int VU_PRIMITIVE_TYPE_CONE
primitive object flag for a cone

See Also:
Constant Field Values

VU_PRIMITIVE_TYPE_CYLINDER

public static final int VU_PRIMITIVE_TYPE_CYLINDER
primitive object flag for a cylinder

See Also:
Constant Field Values

VU_PRIMITIVE_TYPE_SPHERE

public static final int VU_PRIMITIVE_TYPE_SPHERE
primitive object flag for a sphere

See Also:
Constant Field Values

VU_PRIMITIVE_TYPE_LIQUID_SURFACE

public static final int VU_PRIMITIVE_TYPE_LIQUID_SURFACE
primitive object flag for a liquid surface object

See Also:
Constant Field Values

reflectFlags

public int reflectFlags

type

public int type
Constructor Detail

VUPrimitiveObjectInfo

public VUPrimitiveObjectInfo(long ID,
                             long previousID,
                             int type,
                             double val1,
                             double val2,
                             double val3,
                             Color color,
                             int flags,
                             double x,
                             double y,
                             double z,
                             double angleX,
                             double angleY,
                             double angleZ)
Constructs a new VUPrimitiveObjectInfo with a known ID. This constructor should never be used directly


VUPrimitiveObjectInfo

public VUPrimitiveObjectInfo(int type,
                             int reflectFlags,
                             int materialFlags,
                             double val1,
                             double val2,
                             double val3,
                             Color color,
                             double x,
                             double y,
                             double z,
                             double angleX,
                             double angleY,
                             double angleZ)
Constructs a new VUPrimitiveObjectInfo that can be used for putting a new object into a world

Parameters:
type - the type of the object, has to be specified using the VU_PRIMITIVE_TYPE_xxx constants; this value defines as which of the different primitive object types appears afterwards
reflectFlags - this value specifies if and how the surface of the object has to reflect the light, please set a VU_PRIMITIVE_REFLECT_xxx constant here
materialFlags - this one defines the kind of material the object has to consist of using a VU_OBJECT_MATERIAL_xxx constant
val1 - the first parameter value of the object type
val2 - the second parameter value of the object type
val3 - the third parameter value of the object type
color - the color of the new object
x - the x coordinate of the objects position
y - the y coordinate of the objects position
z - the z coordinate of the objects position
angleX - the x angle of the objects orientation
angleY - the y angle of the objects orientation
angleZ - the z angle of the objects orientation
Method Detail

set

public void set(VUPrimitiveObjectInfo oi)

isPrimitive

public static boolean isPrimitive(int type)