Files
create/src/Base/VectorPy.xml
2011-10-10 13:44:52 +00:00

127 lines
4.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
<PythonExport
Father="PyObjectBase"
Name="VectorPy"
Twin="Vector"
TwinPointer="Vector3d"
Include="Base/Vector3D.h"
FatherInclude="Base/PyObjectBase.h"
Namespace="Base"
Constructor="true"
Delete="true"
NumberProtocol="true"
RichCompare="true"
FatherNamespace="Base">
<Documentation>
<Author Licence="LGPL" Name="Juergen Riegel" EMail="FreeCAD@juergen-riegel.net" />
<DeveloperDocu>This is the Vector export class</DeveloperDocu>
<UserDocu>This class represents a 3D float vector</UserDocu>
</Documentation>
<Methode Name="add" Const="true">
<Documentation>
<UserDocu>add(Vector) - return the sum of the two vectors</UserDocu>
</Documentation>
</Methode>
<Methode Name="sub" Const="true">
<Documentation>
<UserDocu>sub(Vector) - return the difference of the two vectors</UserDocu>
</Documentation>
</Methode>
<Methode Name="scale">
<Documentation>
<UserDocu>scale(Float,Float,Float) - scale (multiplies) this vector by a factor</UserDocu>
</Documentation>
</Methode>
<Methode Name="multiply">
<Documentation>
<UserDocu>multiply(Float) - multiplies (scales) this vector by a single factor</UserDocu>
</Documentation>
</Methode>
<Methode Name="dot" Const="true">
<Documentation>
<UserDocu>dot(Vector) - return the dot product of the two vectors</UserDocu>
</Documentation>
</Methode>
<Methode Name="cross" Const="true">
<Documentation>
<UserDocu>cross(Vector) - return the cross product of the two vectors</UserDocu>
</Documentation>
</Methode>
<Methode Name="getAngle" Const="true">
<Documentation>
<UserDocu>getAngle(Vector) - return the angle in radians between the two vectors</UserDocu>
</Documentation>
</Methode>
<Methode Name="normalize">
<Documentation>
<UserDocu>Normalize the vector to the length of 1.0</UserDocu>
</Documentation>
</Methode>
<Methode Name="projectToLine">
<Documentation>
<UserDocu>Deliver the projection point to a given line</UserDocu>
</Documentation>
</Methode>
<Methode Name="projectToPlane">
<Documentation>
<UserDocu>Deliver the projection point to a given plane</UserDocu>
</Documentation>
</Methode>
<Methode Name="distanceToLine" Const="true">
<Documentation>
<UserDocu>Deliver the distance of the point to a given line</UserDocu>
</Documentation>
</Methode>
<Methode Name="distanceToPlane" Const="true">
<Documentation>
<UserDocu>Deliver the distance of the point to a given plane</UserDocu>
</Documentation>
</Methode>
<Attribute Name="Length" ReadOnly="false">
<Documentation>
<UserDocu>To read or modifiy the length of the vector</UserDocu>
</Documentation>
<Parameter Name="Type" Type="Float" />
</Attribute>
<Attribute Name="x" ReadOnly="false">
<Documentation>
<UserDocu>The X component of the vector</UserDocu>
</Documentation>
<Parameter Name="x" Type="Float"/>
</Attribute>
<Attribute Name="y" ReadOnly="false">
<Documentation>
<UserDocu>The Y component of the vector</UserDocu>
</Documentation>
<Parameter Name="y" Type="Float"/>
</Attribute>
<Attribute Name="z" ReadOnly="false">
<Documentation>
<UserDocu>The Z component of the vector</UserDocu>
</Documentation>
<Parameter Name="z" Type="Float"/>
</Attribute>
<Sequence
sq_length="true"
sq_concat="false"
sq_repeat="false"
sq_item="true"
sq_slice="false"
sq_ass_item="true"
sq_ass_slice="false"
sq_contains="false"
sq_inplace_concat="false"
sq_inplace_repeat="false">
</Sequence>
<ClassDeclarations>public:
VectorPy(const Vector3d &amp; vec, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Vector3d(vec),T){}
VectorPy(const Vector3f &amp; vec, PyTypeObject *T = &amp;Type)
:PyObjectBase(new Vector3d(vec.x,vec.y,vec.z),T){}
Vector3d value() const
{ return *(getVectorPtr()); }
</ClassDeclarations>
</PythonExport>
</GenerateModel>