Commit 6d1a89c0 authored by COULAUD Olivier's avatar COULAUD Olivier

Merge commit '68f6584f'

parents 28a865b6 68f6584f
......@@ -56,17 +56,21 @@ public:
FPoint getPosition() const{
return FPoint(data[0],data[1],data[2]);
}
/* //Get a FPoint from the position
FPoint* getPosition() {
return static_cast<FPoint* >(&data);
}*/
//Set the position from a FPoint
/// Set the position from a FPoint
void setPosition(FPoint & inPoint){
data[0] = inPoint.getX();
data[1] = inPoint.getY();
data[2] = inPoint.getZ();
}
//Set the position from a three FReal values
void setPosition(const FReal& inX, const FReal& inY, const FReal &inZ){
data[0] = inX;
data[1] = inY;
data[2] = inZ;
}
//Get a FReal from the physicalValue
FReal getPhysicalValue() const{
return data[3];
......@@ -76,6 +80,10 @@ public:
FReal* setPhysicalValue() {
return &data[3];
}
//Set the physicalValue
void setPhysicalValue(const FReal& Q) {
data[3] = Q;
}
//Get a FReal from the potential
FReal getPotential() const{
......@@ -88,7 +96,11 @@ public:
FAssertLF(WRITE>4,"Cannot set Potential with WRITE<=4");
return &data[4];
}
// Set the potential
void setPotential(const FReal& P) {
FAssertLF(WRITE>4,"Cannot set Potential with WRITE<=4");
data[4] = P;
}
//Get a ptr to read the forces
FReal* getForces() {
FAssertLF(WRITE>7,"Cannot access to forces[] with READ<=8");
......@@ -100,6 +112,14 @@ public:
FAssertLF(WRITE>7,"Cannot set Forces[] with WRITE<=7");
return &data[5];
}
//Set the forces from three values
void setForces(const FReal& inFX, const FReal& inFY, const FReal &inFZ){
FAssertLF(WRITE>7,"Cannot set Forces[] with WRITE<=7");
data[5] = inFX;
data[6] = inFY;
data[7] = inFZ;
}
//Get directly a ptr to the data
FReal * getPtrFirstData(){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment