|
| hatcher (const hatcher &a_from) |
|
hatcher & | operator= (const hatcher &a_from) |
|
bool | compute_single_polyline (vec3f *listPoints, unsigned int number) |
| draw the hatch into the polyline bounding box given in argument More...
|
|
vec2f | resolve_system (const vec3f &A, const vec3f &B, const vec3f &C) |
| Compute a vector system equation aA+bB=C return SbVec2f(0,0) if there is an error set the resolveResult variable to the error code : COLINEAR if A and B are PRECISION_ERROR if there is a lack of precision in computing Z_ERROR if there s no solution for Z UNDEFINED never throw return a SbVec2f for result. More...
|
|
Definition at line 56 of file hatcher.
◆ ResolveErrors
Enumerator |
---|
RESOLVE_OK | |
RESOLVE_COLINEAR | |
RESOLVE_Z_ERROR | |
RESOLVE_PRECISION_ERROR | |
RESOLVE_UNDEFINED | |
Definition at line 258 of file hatcher.
◆ hatcher() [1/2]
tools::hatcher::hatcher |
( |
| ) |
|
|
inline |
Definition at line 58 of file hatcher.
62 ,
fOffset(vec3f(FLT_MAX,FLT_MAX,FLT_MAX))
◆ ~hatcher()
virtual tools::hatcher::~hatcher |
( |
| ) |
|
|
inlinevirtual |
◆ hatcher() [2/2]
tools::hatcher::hatcher |
( |
const hatcher & |
a_from | ) |
|
|
inlineprotected |
◆ check_polyline()
bool tools::hatcher::check_polyline |
( |
vec3f * |
listPoints, |
|
|
unsigned int |
number |
|
) |
| |
test if the polygone given is correct for hatching
- Returns
- FALSE if :
- All points are not in the same plan
- Number of points <3
- Offset point is not in the same plan
- There is less than three different points
- The vector from point[0],point[1] is colinear to point[0],lastPoint
◆ compute_polyline()
bool tools::hatcher::compute_polyline |
( |
vec3f * |
listPoints, |
|
|
unsigned int |
number |
|
) |
| |
draw the hatch into the polyline bounding box given in argument You have to get all compute points by the get_points() method Number of points can be get by number_of_points() The number of vertices in the return polyline can be get by number_of_vertices() and vertice table by get_vertices
- Returns
- FALSE if :
- All points are not in the same plan
- There is a precision error on one or more point
◆ compute_single_polyline()
bool tools::hatcher::compute_single_polyline |
( |
vec3f * |
listPoints, |
|
|
unsigned int |
number |
|
) |
| |
|
protected |
draw the hatch into the polyline bounding box given in argument
- Returns
- FALSE if :
- All points are not in the same plan
- There is a precision error on one or more point
◆ get_angle()
float tools::hatcher::get_angle |
( |
| ) |
const |
|
inline |
◆ get_normal()
const vec3f& tools::hatcher::get_normal |
( |
| ) |
|
|
inline |
◆ get_offset()
float tools::hatcher::get_offset |
( |
| ) |
const |
|
inline |
◆ get_offset_point()
const vec3f& tools::hatcher::get_offset_point |
( |
| ) |
|
|
inline |
◆ get_precision_factor()
float tools::hatcher::get_precision_factor |
( |
| ) |
const |
|
inline |
◆ get_spacing()
float tools::hatcher::get_spacing |
( |
| ) |
const |
|
inline |
◆ get_strip_width()
float tools::hatcher::get_strip_width |
( |
| ) |
const |
|
inline |
◆ operator=()
◆ points()
const std::vector<vec3f>& tools::hatcher::points |
( |
| ) |
|
|
inline |
vector of compute points
Be careful with this function because it can return a set of non convex polygone if you have a non convex polygone at beginning !So, when you want to draw it, you have to use a tesselisation algorithm first
Definition at line 166 of file hatcher.
◆ resolve_system()
Compute a vector system equation aA+bB=C return SbVec2f(0,0) if there is an error set the resolveResult variable to the error code : COLINEAR if A and B are PRECISION_ERROR if there is a lack of precision in computing Z_ERROR if there s no solution for Z UNDEFINED never throw return a SbVec2f for result.
a is 'x' value and b is 'y' if it is correct
◆ set_angle()
void tools::hatcher::set_angle |
( |
float |
a | ) |
|
|
inline |
◆ set_offset()
void tools::hatcher::set_offset |
( |
float |
a | ) |
|
|
inline |
◆ set_offset_point()
void tools::hatcher::set_offset_point |
( |
vec3f |
a | ) |
|
|
inline |
◆ set_precision_factor()
void tools::hatcher::set_precision_factor |
( |
float |
a | ) |
|
|
inline |
◆ set_spacing()
void tools::hatcher::set_spacing |
( |
float |
a | ) |
|
|
inline |
◆ set_strip_width()
bool tools::hatcher::set_strip_width |
( |
float |
a | ) |
|
|
inline |
◆ vertices()
const std::vector<unsigned int>& tools::hatcher::vertices |
( |
| ) |
|
|
inline |
vector of numbers of vertices
Definition at line 170 of file hatcher.
◆ fConflictNumHatchLineTab
std::vector< std::vector<int> > tools::hatcher::fConflictNumHatchLineTab |
|
protected |
conflict line table
Definition at line 246 of file hatcher.
◆ fDirAngle
float tools::hatcher::fDirAngle |
|
protected |
The angle (given in radians) is the one between the first line (point 1-point0) and the hatch lines, in the polyline plan.
Given in the direct axis ((point1-point0),(lastPoint-point0), normalPlanVec). The angle in compute only one time for the first polyline. Changes on angle value for others polyline will not take effect.This is to perform correct hatching between the polylines
Definition at line 210 of file hatcher.
◆ fDirVec
vec3f tools::hatcher::fDirVec |
|
protected |
hatch direction Vector
Definition at line 231 of file hatcher.
◆ fFirstNumHatch
int tools::hatcher::fFirstNumHatch |
|
protected |
first hatch number to draw
Definition at line 252 of file hatcher.
◆ fFirstPolyline
bool tools::hatcher::fFirstPolyline |
|
protected |
◆ fHatchShiftToMatchPointVec
std::vector<float> tools::hatcher::fHatchShiftToMatchPointVec |
|
protected |
hatchShiftToMatchPointVec tab
Definition at line 249 of file hatcher.
◆ fNormal
vec3f tools::hatcher::fNormal |
|
protected |
normal vector for the current polyline
Definition at line 198 of file hatcher.
◆ fNumberHatchToDraw
unsigned int tools::hatcher::fNumberHatchToDraw |
|
protected |
number of hatch to draw
Definition at line 255 of file hatcher.
◆ fOffset
vec3f tools::hatcher::fOffset |
|
protected |
first point of the hatch.
offset = firstPolylinePoint+ShiftVec*offsetValue
Definition at line 222 of file hatcher.
◆ fOffsetValue
float tools::hatcher::fOffsetValue |
|
protected |
between 0-1.
This value set the offset of the hatch.0 meen that the hatch will touch the first point of the polyline, and 1 meen that first hatch will be draw at a 'spacing' distance to first point
Definition at line 217 of file hatcher.
◆ fPoints
std::vector<vec3f> tools::hatcher::fPoints |
|
protected |
vector list of points
Definition at line 240 of file hatcher.
◆ fPrecisionFactor
float tools::hatcher::fPrecisionFactor |
|
protected |
factor for compute error between two points
Definition at line 228 of file hatcher.
◆ fResolveResult
◆ fShift
float tools::hatcher::fShift |
|
protected |
Spacing vector between two hatch.
Definition at line 201 of file hatcher.
◆ fShiftVec
vec3f tools::hatcher::fShiftVec |
|
protected |
Orientation vector for the hatch
Definition at line 225 of file hatcher.
◆ fStripWidth
float tools::hatcher::fStripWidth |
|
protected |
strip with size : set to 0 by default between 0 and 1.0 means no strip, 0.5 means strip size is half of distance between two hatches
Definition at line 237 of file hatcher.
◆ fVertices
std::vector<unsigned int> tools::hatcher::fVertices |
|
protected |
vector vertices number
Definition at line 243 of file hatcher.
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/hatcher