Skip to content

Commit

Permalink
r5120/sofa-dev : FIX: apply the patch provided by Brad Bowman for the…
Browse files Browse the repository at this point in the history
… documentation
  • Loading branch information
falipou committed Jul 22, 2009
1 parent 5af631d commit 936ca1f
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions doc/HowTo/addComponentGUI.tex
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@

\section{How To make your Component modifiable}
When you create your own component, it can be very convenient to display some internal datas, or be able to modify its behavior by modifying a few values. It is made possible by the usage of two objects:
When you create your own component, it can be very convenient to display some internal data, or be able to modify its behavior by modifying a few values. It is made possible by the usage of two objects:
\begin{itemize}
\item sofa::core::objectmodel::Data
\item sofa::core::objectmodel::DataPtr
\end{itemize}
They are templated with the type you want. It can be ``classic'' types, bool, int, double (...), or more complex one (your own data structure). You only have to implement the stream operators ``<<'' and ``>>''. In the constructor of your object, you have to call the function initData, or initDataPtr.
They are templated with the type you want. It can be ``classic'' types, bool, int, double (...), or more complex ones (your own data structure). You only have to implement the stream operators ``<<'' and ``>>''. In the constructor of your object, you have to call the function initData, or initDataPtr.
\\
for instance, let's call your class {\bf foo}. You want to control a parameter of type boolean called {\bf verbose}. You want it to be displayed
\begin{verbatim}
Expand Down
4 changes: 2 additions & 2 deletions doc/HowTo/createSimulation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ \subsubsection{Mechanical}
\item { \bf Topology}: describes how the dofs will be connected
\item { \bf MechanicalState}: the degrees of freedom (dofs) of your object. It is the heart of the simulation
\item { \bf Mass}: the mass attached to each dofs of the object
\item { \bf ForceField}: describes the behavior of your object, how it will interact. If you don``t specify one, your model won't be deformable
\item { \bf ForceField}: describes the behavior of your object, how it will interact. If you don't specify one, your model won't be deformable
\item { \bf Constraint}: optional
\end{enumerate}

Expand All @@ -29,7 +29,7 @@ \subsubsection{Visual}
\begin{enumerate}
\item { \bf GNode}: add a GNode inside your current object. It will contain the components necessary to do the visual mapping
\item { \bf VisualModel}: this component contains the mesh representing your object
\item { \bf Mapping}: a non-mechanical mapping will connect your mesh to the dofs. This mapping won't transmit forces from your visual model to the dofs. If you are writting...
\item { \bf Mapping}: a non-mechanical mapping will connect your mesh to the dofs. This mapping won't transmit forces from your visual model to the dofs. If you are writing...
\begin{itemize}
\item { \bf a c++ file}, take good care of using a non-mechanical template: The second object should be a template of ExtVec3Types
\item { \bf a xml file}, you have to specify the path to the two models to be mapped:
Expand Down
4 changes: 2 additions & 2 deletions doc/HowTo/forcefield.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ \section{How To create a new Force Field}
The simplest way to implement your own ForceField is :
\begin{enumerate}
\item make it derive from sofa::core::componentmodel::behavior::ForceField
\item implements the following virtual fonctions: addForce, getPotentialEnery. Others virtual functions exist like addDForce, addDForceV (if you want to make dynamics), and you should read the doxigen documentation about ForceField.
\item as all the others component you might create, you have to add it to the project. \\Edit \$SOFA\_DIR/modules/sofa/component/component.pro, and add the path to new files in the section HEADERS and SOURCES.
\item implements the following virtual functions: addForce, getPotentialEnery. Others virtual functions exist like addDForce, addDForceV (if you want to make dynamics), and you should read the doxygen documentation about ForceField.
\item as with all the others component you might create, you have to add it to the project. \\Edit \$SOFA\_DIR/modules/sofa/component/component.pro, and add the path to new files in the section HEADERS and SOURCES.
\item Edit \$SOFA\_DIR/modules/sofa/component/init.cpp and add your new forcefield to the list. This step is compulsory for Windows system, and does the linking of a new component to the factory. If you forget it, your component won't be created at initialization time.
\end{enumerate}

Expand Down
2 changes: 1 addition & 1 deletion doc/articulatedBodies/softArticulations.tex
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ \subsection{Skinning}
The articulated body described previously models the skeleton of an object.
To have the external model (for the visual model or the collision model), which follows correctly the skeleton movements, it has to be mapped with the skeleton.
\
A skinning mapping allows us to do this link. The external model is from this moment to deform itself smoothly, i.e. without breaking points around the articulations.
A skinning mapping allows us to do this link. The external model is from this moment able to deform itself smoothly, i.e. without breaking points around the articulations.

The influence of the bones on each point of the external model is given by skinning weights.
2 ways are possible to set the skinning weights to the mapping :
Expand Down
2 changes: 1 addition & 1 deletion doc/design/mappings.tex
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ \subsection{Geometrical layers} \label{sec:geometryLayers}
% g�om�trie suppl�mentaire d�e aux contacts
When shapes collide, additional geometry can be necessary to model the contact.
For instance, when an edge intersects another one, a contact force is applied to the intersection points.
These points are defined by their barycentric coordinates with respect to their edge vertices. Other relations can be used, depending on the king of geometrical primitives in contact.
These points are defined by their barycentric coordinates with respect to their edge vertices. Other relations can be used, depending on the kind of geometrical primitives in contact.
This additional geometry requires another geometrical layer connected to the shape by a mapping, as illustrated in figure~\ref{fig:hierarchy}.
% This layer is also connected to the shape using mappings:
% \begin{eqnarray*} %\label{eq:mapV}
Expand Down
6 changes: 3 additions & 3 deletions doc/introduction/introduction_body.tex
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ \section{Commented example} \label{sec:commentedExample}
In this example, the masses are stored in \texttt{UniformMass} components.
The types of their values are related to the types of their associated DOF.
\texttt{UniformMass} is derived from the abstract \texttt{Mass} class, and stores only one value, for the case where all the associated objects have the same mass.
If necessary, it can be replaced by a \texttt{DiagonalMass} instanciated on the same DOF types, for the case where the associated objects have different masses.
If necessary, it can be replaced by a \texttt{DiagonalMass} instantiated on the same DOF types, for the case where the associated objects have different masses.
This is an important feature of \sofa: each component can be replaced by another one deriving from the same abstract class and instantiated on the same DOF types.
This results in a high flexibility.

Expand Down Expand Up @@ -123,7 +123,7 @@ \section{Multi-model objects} \label{sec:multimodel}
The corresponding xml code is given in section~\ref{xml:liver}.
\label{bla:liver}

On top of the scene, collision-related components allow a user to interact with the collision models using rays casted from the mouse pointer and hitting collision models.
On top of the scene, collision-related components allow a user to interact with the collision models using rays cast from the mouse pointer and hitting collision models.
%Collision is discussed in section~\ref{sec:collision}.

The liver is modeled using three nodes, in two levels.
Expand Down Expand Up @@ -268,7 +268,7 @@ \subsection{ODE Solvers}
\section{State vectors} \label{sec:statevectors}
The state vectors contain the coordinates, velocites, and other DOF-related values such as force and acceleration.
They are stored in \texttt{MechanicalObject} components.
This template class can be instanciated on a variety of types to model particles, rigid bodies or other types of bodies.
This template class can be instantiated on a variety of types to model particles, rigid bodies or other types of bodies.
The template parameter is a \texttt{DataTypes} class which describes data and data containers, such as the the type of coordinates and coordinate derivatives used.
These two types are the same in the case of particles, but they are different in the case of rigid bodies.

Expand Down
8 changes: 4 additions & 4 deletions doc/modules/GUI/GUI.tex
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@ \subsection{Graph Tab}

This graph can dynamically change during the simulation: collisions can create new nodes, new components in case of contacts. But you can directly interact with it too. Double clicking on an item of the graph will make appear a small window displaying important data.

To know how to display the information of your brand new Sofa component, please refer to the section ``How to configure your Component''. Only objects of type ``sofa::core::objectmodel::Data'' or ``sofa::core::objectmodel::DataPtr'' can be displayed. It is important to understand that only these information will be kept if you decide to save the simulation. Loading a saved simulation, will just fill the components with these datas.
This kind of dialog windows give the possibility to modify directly some characteristics of your component. Take care of clicking on the button ``Update'' once you have completed your modifications.
To know how to display the information of your brand new Sofa component, please refer to the section ``How to configure your Component''. Only objects of type ``sofa::core::objectmodel::Data'' or ``sofa::core::objectmodel::DataPtr'' can be displayed. It is important to understand that only these information will be kept if you decide to save the simulation. Loading a saved simulation, will just fill the components with this data.
This kind of dialog windows give the possibility to modify directly some characteristics of your component. Take care to click on the button ``Update'' once you have completed your modifications.

\begin{figure}[htpb]
\centering
Expand All @@ -127,9 +127,9 @@ \subsection{Graph Tab}
\par
A Node gives access to much more interactions: right clicking on one of them makes appear a small context window.
\begin{itemize}
\item {\bf Collapse}: Collapse the graph from the current node, so that remain visible the other Nodes and the components right below
\item {\bf Collapse}: Collapse the graph from the current node, close all the nodes below the clicked one
\item {\bf Expand}: Expand the graph, and open all the nodes below the clicked one
\item {\bf Desactivate}: Desactivate a part of the scene. Everything below this node won't be anymore taken into account. BUT it remains in the scene, and can be Activated again at any time
\item {\bf Desactivate}: Deactivate a part of the scene. Everything below this node won't be anymore taken into account. BUT it remains in the scene, and can be Activated again at any time
\item {\bf Save Node}: Export in a XML files a part of the simulation
\item {\bf Add Node}: Read a XML files describing an object or a whole scene, and put it right below the clicked node.
An interesting feature to note, is when you might be always using, and adding the same set of objects, you will find it convenient to add in the file scenes/object.txt the path to them. Like this, they will directly appear in the dialog window by default.
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/collision/modules_collision.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ \subsection{Ray Traced Collision Detection}


\subsubsection{Using this module}
An exemple showing the usage of the Ray Traced collision detection can be found in the RayTraceCollision.scn file in the \textit{scene} directory. The collision detection mechanism must be set as \textbf{RayTraceDetection}, and instead of using a TriangleModel one must use a \textbf{TriangleOctreeModel}. The TriangleOctreeModel will create an Octree that contains all the Triangles from the collision model.
An example showing the usage of the Ray Traced collision detection can be found in the RayTraceCollision.scn file in the \textit{scene} directory. The collision detection mechanism must be set as \textbf{RayTraceDetection}, and instead of using a TriangleModel one must use a \textbf{TriangleOctreeModel}. The TriangleOctreeModel will create an Octree that contains all the Triangles from the collision model.

Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ \subsubsection{Data Fields}
\end{itemize}
\item A hack on masses (for debugging)
\begin{itemize}
\item useMass (bool) : do the condensated mass matrices are used ? (if not, scalar masses concentrated on particles are used) (default = 0)
\item useMass (bool) : are the condensated mass matrices are used ? (if not, scalar masses concentrated on particles are used) (default = 0)
\item totalMass (float) : if useMass=false, the scalar mass of the object
\end{itemize}
\end{itemize}
Expand Down Expand Up @@ -86,5 +86,5 @@ \subsubsection{Example}
\textbf{Important} : note that the SparseGrid has nbVirtualFinerLevels=2 in order to built enough finer virtual levels. This SparseGrid$->$nbVirtualFinerLevels has to be greater or equal to the NonUniformHexahedronFEMForceFieldAndMass$->$nbVirtualFinerLevels.
\\

A more complex example can be found in : examples/Components/forcefield/NonUniformHexahedronFEMForceFieldAndMass.scn where a comparaison with a classical HexahedronFEMForceFieldAndMassForceField is done.
A more complex example can be found in : examples/Components/forcefield/NonUniformHexahedronFEMForceFieldAndMass.scn where a comparison with a classical HexahedronFEMForceFieldAndMassForceField is done.

4 changes: 2 additions & 2 deletions doc/modules/topology/meshTopologies.tex
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ \subsection{Introduction}

While mesh geometry describes where mesh vertices are located in space, mesh topology tells
how vertices are connected to each other by edges, triangles or any type of mesh element.
Both information are required on a computational mesh to perform :
Both bits of information are required on a computational mesh to perform :

\begin{itemize}

\item \textbf{Mesh Visualization},

\item \textbf{Collision detection} : some collision detection are mesh based (e.g.
\item \textbf{Collision detection} : some collision detection methods are mesh based (e.g.
triangles or edges),

\item \textbf{Mechanical Modeling} : deforming a mesh also requires to the
Expand Down
Binary file modified doc/sofaDocumentation/sofadocumentation.pdf
Binary file not shown.

0 comments on commit 936ca1f

Please sign in to comment.