const gp_Pnt& A1 = TA1.Value(i);
const gp_Pnt& A2 = TA2.Value(i);
const gp_Pnt& A3 = TA3.Value(i);
- gp_Vec OA1(A1.XYZ());
+ gp_Vec OA1(A1.X(), A1.Y(), A1.Z());
gp_Vec VA0 = gp_Vec(A1,A2);
gp_Vec VA = gp_Vec(A1,A3);
VA0.Cross(VA);
Init (me: in out; V: Array1Item);
---Purpose: Initializes the array with a given value.
- ---C++: inline
Destroy (me: in out);
---Purpose: Frees the allocated area corresponding to the
#include <Standard_DimensionMismatch.hxx>
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+
+void TCollection_Array1::Init (const Array1Item& V) {
+ Array1Item* p = &ChangeValue(myLowerBound);
+ const Standard_Integer n = Length();
+ for(Standard_Integer i = 0; i < n; i++) {
+ p[i] = V;
+ }
+}
+
//=======================================================================
//function : Assign
//purpose :
// and conditions governing the rights and limitations under the License.
#include <Standard.hxx>
-#include <Standard_OutOfMemory.hxx>
#include <Standard_OutOfRange.hxx>
#include <Standard_RangeError.hxx>
Array1Item* p = new Array1Item[Up-Low+1];
- if (!p) Standard_OutOfMemory::Raise("Array1 : Allocation failed");
myStart = (void*)(p - myLowerBound);
}
myStart = (void*)( &AnItem - Low );
}
-//=======================================================================
-//function : Init
-//purpose :
-//=======================================================================
-
-inline void TCollection_Array1::Init (const Array1Item& V) {
- Array1Item* p = &ChangeValue(myLowerBound);
- const Standard_Integer n = Length();
- for(Standard_Integer i = 0; i < n; i++) {
- p[i] = V;
- }
-}
-
//=======================================================================
//function : Destroy
//purpose :
raises
RangeError from Standard,
OutOfMemory from Standard;
- ---C++: inline
Create (AnArray : Array2)
returns Array2 from TCollection
---Purpose: creates an Array2 by copy of an Array2.
raises OutOfMemory from Standard is private ;
- ---C++: inline
Create (Item : Array2Item; R1, R2, C1, C2: Integer from Standard)
returns Array2 from TCollection
raises
RangeError from Standard,
OutOfMemory from Standard;
- ---C++: inline
Init(me : in out; V : Array2Item);
---Purpose: Initializes this array with the value <Value>.
- ---C++: inline
Destroy (me : in out );
---Level: Advanced
-- DoubleArray the Destroy doesn't delete the area.
--
---C++: alias ~
- ---C++: inline
Assign (me: in out; Other: Array2)
returns Array2 from TCollection
myData = (void*) (q - myLowerRow);
}
+//=======================================================================
+//function : TCollection_Array2
+//purpose :
+//=======================================================================
+
+TCollection_Array2::TCollection_Array2 (const Standard_Integer R1,
+ const Standard_Integer R2,
+ const Standard_Integer C1,
+ const Standard_Integer C2) :
+ myLowerRow(R1),
+ myLowerColumn(C1),
+ myUpperRow(R2),
+ myUpperColumn(C2),
+ myDeletable(Standard_True)
+{
+ Allocate ();
+}
+
+//=======================================================================
+//function : TCollection_Array2
+//purpose : User allocated data
+//=======================================================================
+
+TCollection_Array2::TCollection_Array2 (const Array2Item& Item,
+ const Standard_Integer R1,
+ const Standard_Integer R2,
+ const Standard_Integer C1,
+ const Standard_Integer C2) :
+ myLowerRow(R1),
+ myLowerColumn(C1),
+ myUpperRow(R2),
+ myUpperColumn(C2),
+ myDeletable(Standard_False),
+ myData((void*)&Item)
+{
+ Allocate ();
+}
+
+//=======================================================================
+//function : Init
+//purpose :
+//=======================================================================
+
+void TCollection_Array2::Init (const Array2Item& V)
+{
+ Standard_Integer Size = RowLength() * ColLength();
+ Array2Item* p = &(ChangeValue(myLowerRow,myLowerColumn));
+ for (Standard_Integer I = 0; I < Size ; I++) p[I] = V;
+}
+
+//=======================================================================
+//function : Destroy
+//purpose :
+//=======================================================================
+
+void TCollection_Array2::Destroy ()
+{
+ Array2Item** anItemPtr = ((Array2Item**)myData + myLowerRow);
+
+ // delete the data
+ //
+ if (myDeletable)
+ delete [] &ChangeValue(myLowerRow,myLowerColumn);
+
+ // delete the indirection table
+ Standard::Free((void*&)anItemPtr);
+}
//=======================================================================
//function : Assign
#include Array2Item_hxx
-//=======================================================================
-//function : TCollection_Array2
-//purpose :
-//=======================================================================
-
-inline TCollection_Array2::TCollection_Array2 (const Standard_Integer R1,
- const Standard_Integer R2,
- const Standard_Integer C1,
- const Standard_Integer C2) :
- myLowerRow(R1),
- myLowerColumn(C1),
- myUpperRow(R2),
- myUpperColumn(C2),
- myDeletable(Standard_True)
-{
- Allocate ();
-}
-
-//=======================================================================
-//function : TCollection_Array2
-//purpose : User allocated data
-//=======================================================================
-
-inline TCollection_Array2::TCollection_Array2 (const Array2Item& Item,
- const Standard_Integer R1,
- const Standard_Integer R2,
- const Standard_Integer C1,
- const Standard_Integer C2) :
- myLowerRow(R1),
- myLowerColumn(C1),
- myUpperRow(R2),
- myUpperColumn(C2),
- myDeletable(Standard_False),
- myData((void*)&Item)
-{
- Allocate ();
-}
-
-//=======================================================================
-//function : Init
-//purpose :
-//=======================================================================
-
-inline void TCollection_Array2::Init (const Array2Item& V)
-{
- Standard_Integer Size = RowLength() * ColLength();
- Array2Item* p = &(ChangeValue(myLowerRow,myLowerColumn));
- for (Standard_Integer I = 0; I < Size ; I++) p[I] = V;
-}
-
-//=======================================================================
-//function : Destroy
-//purpose :
-//=======================================================================
-
-inline void TCollection_Array2::Destroy ()
-{
- Array2Item** anItemPtr = ((Array2Item**)myData + myLowerRow);
-
- // delete the data
- //
- if (myDeletable)
- delete [] &ChangeValue(myLowerRow,myLowerColumn);
-
- // delete the indirection table
- Standard::Free((void*&)anItemPtr);
-}
-
//=======================================================================
//function : ColLength
//purpose :