org.jocl.cloth
Class ParticleData

java.lang.Object
  extended by org.jocl.cloth.ParticleData
All Implemented Interfaces:
java.io.Serializable

 class ParticleData
extends java.lang.Object
implements java.io.Serializable

A plain structure holding the data for a set of particles


Field Summary
(package private)  float[] accelerations
          The accelerations of the particles.
(package private)  float[] candidatePositions
          The candidate positions of the particles, which are used for the intermediate state of the computation.
(package private)  float[] constraintPositions
          The positions of the constraints.
(package private)  int[] constraints
          The constraints for the particles.
(package private)  float[] invMasses
          Stores for each particle its inverse mass
(package private)  int numConstraints
          The number of constraints.
(package private)  int numParticles
          The number of particles
(package private)  float[] positions
          The positions of the particles.
(package private)  float[] velocities
          The velocities of the particles.
 
Constructor Summary
ParticleData()
          Default constructor
 
Method Summary
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numParticles

int numParticles
The number of particles


positions

float[] positions
The positions of the particles.
 positions[particleIndex*STRIDE+0] = position.x;
 positions[particleIndex*STRIDE+1] = position.y;
 positions[particleIndex*STRIDE+2] = position.z;
 where 
 particleIndex = 0...numParticles-1
 STRIDE = 4 (usually)
 


candidatePositions

float[] candidatePositions
The candidate positions of the particles, which are used for the intermediate state of the computation. Using the same layout as the positions


velocities

float[] velocities
The velocities of the particles. Using the same layout as the positions


accelerations

float[] accelerations
The accelerations of the particles. Using the same layout as the positions


invMasses

float[] invMasses
Stores for each particle its inverse mass


numConstraints

int numConstraints
The number of constraints.


constraints

int[] constraints
The constraints for the particles. That is, the indices of particles that should not move due to the simulation.
 constraints[index] = indexOfConstrainedParticle
 where
 index = 0...numConstraints-1
 


constraintPositions

float[] constraintPositions
The positions of the constraints.
 positions[constraintIndex*STRIDE+0] = position.x;
 positions[constraintIndex*STRIDE+1] = position.y;
 positions[constraintIndex*STRIDE+2] = position.z;
 where 
 constraintIndex = 0...numConstraints-1
 STRIDE = 4 (usually)
 

Constructor Detail

ParticleData

ParticleData()
Default constructor

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object