|
|
TViewParameters |
The TViewParameters data structure defines the parameters of an OrcaFlex 3D View.
typedef struct {
int Size;
double ViewSize;
double ViewAzimuth;
double ViewElevation;
TVector ViewCentre;
int Height;
int Width;
COLORREF BackgroundColour;
BOOL DrawViewAxes;
BOOL DrawScaleBar;
BOOL DrawGlobalAxes;
BOOL DrawEnvironmentAxes;
BOOL DrawLocalAxes;
BOOL DrawOutOfBalanceForces;
BOOL DrawNodeAxes;
int GraphicsMode;
int FileFormat;
double ViewGamma;
TOrcFxAPIHandle RelativeToObjectHandle;
TOrcFxAPIHandle DisturbanceVesselHandle;
TVector2 DisturbancePosition;
int ShadedFillMode;
BOOL DrawNameLabels;
BOOL DrawConnections;
int LabelScale;
BOOL DrawOrigins;
BOOL MonochromeOutput;
BOOL AddDetailsToOutput;
int JpegCompressionQuality;
int PixelsPerInch;
BOOL DrawSupportCylinderAxes;
BOOL DrawTrails;
TOrcFxAPIHandle FilterHandle;
int AntiAliasingMaxSampleCount;
int ShadedProjectionMode;
} TViewParameters;
Specifies the size, in bytes, of this data structure. Set this member to sizeof(TViewParameters) before calling a function with a TViewParameters parameter.
Determines the size and orientation of the view. For more details please refer to the OrcaFlex documentation.
Defines the 3D global coordinates of the point that is shown at the centre of the view.
The view settings will be relative to this object. Use NULL for relative to global axes.
Defines the height and width of the view in pixels.
Defines the background colour of the view. This member can be set using the RGB Windows macro.
Determines whether the view axes, scale bar etc. are drawn in the view. For more details please refer to the OrcaFlex documentation.
Determines which OrcaFlex graphics mode is used to produce the system view. Can be either gmWireFrame or gmShaded.
Determines which bitmap file format is output by calls to C_SaveModel3DViewBitmapMem and C_SaveModel3DViewBitmapToFile. Can be one of the following: bffWindowsBitmap, bffPNG, bffGIF, bffJPEG, bffPDF or bffRGB. This member is ignored by C_CreateModel3DViewBitmap since that function creates a bitmap handle rather than a file or byte array.
When bffRGB is specified, the pixel data is returned as a packed array of RGB values, with 8 bit colour channels. Thus the pixel data has size equal to Height * Width * 3.
Specifies that the sea surface will be drawn as if disturbed by the presence of this vessel. Use NULL to view the undisturbed sea surface. For more details please refer to the OrcaFlex documentation.
Specifies the position on the sea surface at which the disturbance due to a vessel will be computed. This is only used if the sea state RAOs are being interpolated on direction and period only (see the OrcaFlex documentation for more details).
Determines which fill mode is used for shaded graphics. Can be either fmSolid or fmMesh.
A percentage value that determines the size of name labels and label shape text.
When set to TRUE, wire frame views are drawn in black and white.
When set to TRUE, 3D views are drawn with a text label identifying the program version and giving details of the model's latest loaded or saved file.
A value between 1 and 100 that determines the quality of JPEG files. Lower values have poorer visual quality, but greater compression (i.e. smaller file size). Higher values have better visual quality, but less compression (i.e. larger file size). If a negative value is specified then a default value of 95 is used.
Used to control how line thickness and fonts are scaled. A value of 96 corresponds to 100% system font scaling. This is the minimum possible value, so if a value less than 96 is specified, then 96 will be used. A value of 144 corresponds to 150% font scaling, etc. This field should be set to match the target display device. For instance, if you are displaying on a high pixel density monitor then you should set this field to match the pixels per inch of that monitor.
When set to TRUE, wire frame views are drawn to allow replication of the show trails option of OrcaFlex replays. The fixed parts of the drawing (global axes, scale bar, seabed etc.) are not drawn at all, nor is the sea surface. The remaining parts of the drawing (lines, vessels, etc.) are drawn in grey.
This functionality is expected to be used to create a replay with trails. This would typically be done using a bitmap canvas. The final frame added to the canvas would have DrawTrails set to FALSE so that the active frame, including fixed parts, could be drawn in colour. All earlier frames would have DrawTrails set to TRUE.
Specifies a handle to a view filter object created by calling C_CreateViewFilter. This is used to control which components of a model are drawn.
If this member is NULL then no filtering of the view will be performed.
For shaded graphics views, this specifies the maximum number of samples used per pixel in multi sample anti-aliasing (MSAA). OrcaFlex will choose the highest supported sample count on your machine equal to or less than this value. Set the max sample count to 1 to disable MSAA.
A higher sample count will improve the image quality, at a performance cost.
Typical sample counts are powers of 2 such as 2, 4 or 8. We would not advise setting the max sample count greater than 8. The improvement in quality at these levels is unlikely to be discernible, and the performance may be significantly impacted. In any case, very few graphics cards support values greater than 8.
Determines which projection mode is used for shaded graphics. Can be either pmPerspective or pmParallel.
C_CreateModel3DViewBitmap, C_CreateViewFilter, C_GetDefaultViewParameters, C_SaveModel3DViewBitmapMem, C_SaveModel3DViewBitmapToFile.