Package WildMagic.LibGraphics.SceneGraph
Class Attributes
- java.lang.Object
-
- WildMagic.LibGraphics.SceneGraph.Attributes
-
- All Implemented Interfaces:
java.io.Serializable
public class Attributes extends java.lang.Object implements java.io.SerializableSet the attributes you want. The currently supported attributes are p = position 3 or 4 channels (xyz,xyzw) n = normal vector 3 or 4 channels (xyz,xyzw) ci = color 1 to 4 channels (r,rg,rgb,rgba) ti = texture coordinate 1 to 4 channels (s,st,str,strq) The attrbitues are organized internally to have the ordering: p, n, c0, c1, ..., t0, t1, ...- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private intm_iChannelQuantityThe number of 'float' channels used by all attributes.private intm_iNChannelsnumber of floats per normal.private intm_iNOffsetnormal offset.private intm_iPChannelsnumber of floats per position.private intm_iPOffsetposition offset.private java.util.Vector<java.lang.Integer>m_kCChannelscolor channels (1-4 color units).private java.util.Vector<java.lang.Integer>m_kCOffsetcolor offsets (1-4 color units).private java.util.Vector<java.lang.Integer>m_kTChannelstexture coordinate channels (1-4 texture coordinate units).private java.util.Vector<java.lang.Integer>m_kTOffsettexture coordinate offsets (1-4 texture coordinate units).private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description Attributes()Create default VertexBuffer Rendering Attributes:Attributes(Attributes rkA)Copy constructor:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Delete memory.intGetCChannels(int iUnit)Access to color information.intGetChannelQuantity()The number of 'float' channels used by all the attributes.intGetCOffset(int iUnit)Access to color information.intGetMaxColors()Access to color information.intGetMaxTCoords()Access to texture coordinate information.intGetNChannels()Access to normal information.intGetNOffset()Access to normal information.intGetPChannels()Access to position information.intGetPOffset()Access to position information.intGetTChannels(int iUnit)Access to texture coordinate information.intGetTOffset(int iUnit)Access to texture coordinate information.booleanHasColor(int iUnit)Access to color information.booleanHasNormal()Access to normal information.booleanHasPosition()Access to position information.booleanHasTCoord(int iUnit)Access to texture coordinate information.voidSetCChannels(int iUnit, int iCChannels)Set color attribute.voidSetNChannels(int iNChannels)Set normal attribute.voidSetPChannels(int iPChannels)Set position attribute.voidSetTChannels(int iUnit, int iTChannels)Set texture coordinate attriubute.private voidUpdateOffsets()Update offsets when attributes change.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_iChannelQuantity
private int m_iChannelQuantity
The number of 'float' channels used by all attributes.
-
m_iPOffset
private int m_iPOffset
position offset.
-
m_iPChannels
private int m_iPChannels
number of floats per position.
-
m_iNOffset
private int m_iNOffset
normal offset.
-
m_iNChannels
private int m_iNChannels
number of floats per normal.
-
m_kCOffset
private java.util.Vector<java.lang.Integer> m_kCOffset
color offsets (1-4 color units).
-
m_kCChannels
private java.util.Vector<java.lang.Integer> m_kCChannels
color channels (1-4 color units).
-
m_kTOffset
private java.util.Vector<java.lang.Integer> m_kTOffset
texture coordinate offsets (1-4 texture coordinate units).
-
m_kTChannels
private java.util.Vector<java.lang.Integer> m_kTChannels
texture coordinate channels (1-4 texture coordinate units).
-
-
Constructor Detail
-
Attributes
public Attributes()
Create default VertexBuffer Rendering Attributes:
-
Attributes
public Attributes(Attributes rkA)
Copy constructor:- Parameters:
rkA- Attributes to copy.
-
-
Method Detail
-
dispose
public void dispose()
Delete memory.
-
GetCChannels
public int GetCChannels(int iUnit)
Access to color information.- Returns:
- the number of floats per color.
-
GetChannelQuantity
public final int GetChannelQuantity()
The number of 'float' channels used by all the attributes.
-
GetCOffset
public int GetCOffset(int iUnit)
Access to color information.- Returns:
- the color offset.
-
GetMaxColors
public final int GetMaxColors()
Access to color information.- Returns:
- the number of used colors units.
-
GetMaxTCoords
public final int GetMaxTCoords()
Access to texture coordinate information.- Returns:
- the number of used texture coordinates units.
-
GetNChannels
public final int GetNChannels()
Access to normal information.- Returns:
- the number of floats per normal.
-
GetNOffset
public final int GetNOffset()
Access to normal information.- Returns:
- the normal offset.
-
GetPChannels
public final int GetPChannels()
Access to position information.- Returns:
- the number of floats per position.
-
GetPOffset
public final int GetPOffset()
Access to position information.- Returns:
- the position offset.
-
GetTChannels
public int GetTChannels(int iUnit)
Access to texture coordinate information.- Returns:
- the number of floats per texture coordinate.
-
GetTOffset
public int GetTOffset(int iUnit)
Access to texture coordinate information.- Returns:
- the texture coordinate offset.
-
HasColor
public boolean HasColor(int iUnit)
Access to color information.- Returns:
- true if the color attribute is used.
-
HasNormal
public final boolean HasNormal()
Access to normal information.- Returns:
- true if the normal attribute is used.
-
HasPosition
public final boolean HasPosition()
Access to position information.- Returns:
- true if the position attribute is used.
-
HasTCoord
public boolean HasTCoord(int iUnit)
Access to texture coordinate information.- Returns:
- true if the texture coordinate attribute is used.
-
SetCChannels
public void SetCChannels(int iUnit, int iCChannels)Set color attribute.- Parameters:
iUnit- color unit (0-4).iCChannels- number of floats per color.
-
SetNChannels
public void SetNChannels(int iNChannels)
Set normal attribute.- Parameters:
iNChannels- number of floats per normal.
-
SetPChannels
public void SetPChannels(int iPChannels)
Set position attribute.- Parameters:
iPChannels- number of floats per position.
-
SetTChannels
public void SetTChannels(int iUnit, int iTChannels)Set texture coordinate attriubute.- Parameters:
iUnit- texture unit (0-4).iTChannels- number of floats per texture coordinate.
-
UpdateOffsets
private void UpdateOffsets()
Update offsets when attributes change.
-
-