Foxit PDF SDK

fs_pdf3d.h
1 #if (defined(_WIN32) || defined(_WIN64)) || defined(__EMSCRIPTEN__)
2
16 #ifndef FS_3DPDF_H_
17 #define FS_3DPDF_H_
18 #include "common/fs_common.h"
19 #include "pdf/fs_pdfdoc.h"
20 #include "pdf/annots/fs_annot.h"
26 namespace foxit {
28 namespace addon {
30 namespace pdf3d {
32 class PDF3DAnnotViewData FS_FINAL : public Object{
33 public:
35 PDF3DAnnotViewData(){}
36
42 PDF3DAnnotViewData(const PDF3DAnnotViewData& other) {
43 this->display_name = other.display_name;
44 this->name = other.name;
45 }
46
53 PDF3DAnnotViewData& operator = (const PDF3DAnnotViewData& data) {
54 this->display_name = data.display_name;
55 this->name = data.name;
56 return *this;
57 }
58
60 WString display_name;
61
63 WString name;
64 };
65
67 FSDK_DEFINE_ARRAY(PDF3DAnnotViewDataArray, PDF3DAnnotViewData)
68
69
74 class ModelNode FS_FINAL : public Base{
75 public:
81 typedef enum _PDF3DModelNodeType {
83 e_TypeModelRoot = 0,
85 e_TypeGroup = 1,
87 e_TypeMesh = 2,
89 e_TypeSprite = 3,
91 e_TypeMarkup = 4,
93 e_TypePunctualLight = 5,
95 e_TypeAmbientLight = 6,
97 e_TypeViewCamera = 7,
99 e_TypeClippingPlane = 8,
101 e_TypeProcedural = 9,
103 e_TypeBone = 10,
105 e_TypeDummy = 11
106 } PDF3DModelNodeType;
107
109 ModelNode() {}
110
116 ModelNode(const ModelNode& other);
117
119 ~ModelNode();
120
128 bool IsEmpty() const;
129
137 ModelNode& operator=(const ModelNode& other);
138
146 bool operator==(const ModelNode& other) const;
147
155 bool operator!=(const ModelNode& other) const;
156
163 PDF3DModelNodeType GetNodeType();
164
170 ModelNode GetFirstChildNode();
171
177 ModelNode GetNextSiblingNode();
178
184 ModelNode GetParentNode();
185
191 WString GetName();
192
201 void SetVisible(bool is_visible);
202
208 bool IsVisible();
209
210 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
211 explicit ModelNode(FS_HANDLE handle);
212 };
213
219 class PDF3DAnnotInstance FS_FINAL : public Base{
220 public:
226 typedef enum _PDF3DController {
228 e_ControllerRotate = 0,
230 e_ControllerSpin = 1,
232 e_ControllerPan = 2,
234 e_ControllerZoom = 3,
236 e_ControllerWalk = 4,
238 e_ControllerFly = 5
239 } PDF3DController;
240
246 typedef enum _PDF3DRenderMode {
248 e_RenderModeSolid = 1,
250 e_RenderModeSolidWireframe = 2,
252 e_RenderModeSolidOutline = 3,
254 e_RenderModeTransparent = 4,
256 e_RenderModeTransparentWireframe = 5,
258 e_RenderModeBoundingBox = 6,
260 e_RenderModeTransparentBoundingBox = 7,
262 e_RenderModeTransparentBoundingBoxOutline = 8,
264 e_RenderModeWireframe = 9,
266 e_RenderModeShadedWireframe = 10,
268 e_RenderModeHiddenWireframe = 11,
270 e_RenderModeIllustration = 12,
272 e_RenderModeShadedIllustration = 13,
274 e_RenderModeVertices = 14,
276 e_RenderModeShadedVertices = 15
277 } PDF3DRenderMode;
278
279
281 PDF3DAnnotInstance(){}
282
288 PDF3DAnnotInstance(const PDF3DAnnotInstance& other);
289
291 ~PDF3DAnnotInstance();
292
300 PDF3DAnnotInstance& operator=(const PDF3DAnnotInstance& other);
301
309 bool operator==(const PDF3DAnnotInstance& other) const;
310
318 bool operator!=(const PDF3DAnnotInstance& other) const;
319
327 bool IsEmpty() const;
328
340 void SetController(PDF3DController tool_tag);
341
353 void SetRenderMode(PDF3DRenderMode render_mode);
354
362 FX_HWND ActivateCanvas(FX_HWND screen_canvas_parent);
363
374 void UpdateCanvas(RectI rect);
375
386 void OnLButtonDown(int flag, PointF point);
387
398 void OnLButtonUp(int flag, PointF point);
399
410 void OnMouseMove(int flag, PointF point);
411
423 void OnMouseWheel(int flag, int delta, PointF point);
424
435 void OnRButtonDown(int flag, PointF point);
436
447 void OnRButtonUp(int flag, PointF point);
448
456 void ResetDefaultView();
457
465 PDF3DAnnotViewDataArray GetPresetViewList();
466
476 void ApplyPresetView(const PDF3DAnnotViewData& view_data);
477
485 ModelNode GetRootNode();
486
487 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
488 explicit PDF3DAnnotInstance(FS_HANDLE handle);
489 };
491 FSDK_DEFINE_ARRAY(PDF3DAnnotInstanceArray, PDF3DAnnotInstance)
492
493
494 class PDF3DAnnot FS_FINAL : public Base{
495 public:
501 typedef enum _PDF3DType {
503 e_3DTypeArtwork = 0,
505 e_3DTypeRichMedia = 1
506 } PDF3DType;
507
508
510 ~PDF3DAnnot();
511
517 PDF3DAnnot(const PDF3DAnnot& other);
518
526 PDF3DAnnot& operator=(const PDF3DAnnot& other);
527
535 bool operator==(const PDF3DAnnot& other) const;
536
544 bool operator!=(const PDF3DAnnot& other) const;
545
553 bool IsEmpty() const;
554
560 int GetAnnotIndex();
561
567 pdf::annots::Annot GetAnnot();
568
575 PDF3DType Get3DAnnotType();
576
584 PDF3DAnnotInstance Get3DArtworkInstance();
585
593 PDF3DAnnotInstanceArray GetRichMediaInstances();
594
595 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
596 explicit PDF3DAnnot(FS_HANDLE handle);
597 };
598 FSDK_DEFINE_ARRAY(PDF3DAnnotArray, PDF3DAnnot)
599
600
601 class PDF3DLaunchSetting FS_FINAL : public Object {
602 public:
608 typedef enum _PDF3DActivationEnableSetting {
610 e_3DActivationEnableSettingContentClicked = 0,
612 e_3DActivationEnableSettingPageOpened = 1,
614 e_3DActivationEnableSettingPageVisible = 2
615 } PDF3DActivationEnableSetting;
616
622 typedef enum _PDF3DActivationDisableSetting {
624 e_3DActivationDisableSettingContextMenuSelected = 0,
626 e_3DActivationDisableSettingPageClosed = 1,
628 e_3DActivationDisableSettingPageInvisible = 2
629 } PDF3DActivationDisableSetting;
630
636 typedef enum _PDF3DActivationPlaybackStyleSetting {
638 e_3DActivationPlaybackStyleOnPage = 0,
640 e_3DActivationPlaybackStyleInFloatingWindow = 1
641 } PDF3DActivationPlaybackStyleSetting;
642
648 typedef enum _PDF3DAppearanceSettingBorderWidth {
650 e_3DAppearanceSettingBorderWidthNone = 0,
652 e_3DAppearanceSettingBorderWidthThin = 1,
654 e_3DAppearanceSettingBorderWidthMedium = 2,
656 e_3DAppearanceSettingBorderWidthThick = 3
657 } PDF3DAppearanceSettingBorderWidth;
658
664 typedef enum _PDF3DPosterImageSetting {
666 e_3DPosterImageKeepCurrent = 0,
668 e_3DPosterImageRetrieveFromDefaultView = 1,
670 e_3DPosterImageCreateFromFile = 2
671 } PDF3DPosterImageSetting;
672
673
675 PDF3DLaunchSetting()
676 : activation_enable(e_3DActivationEnableSettingContentClicked)
677 , activation_disable(e_3DActivationDisableSettingContextMenuSelected)
678 , activation_playback(e_3DActivationPlaybackStyleOnPage)
679 , window_width(320)
680 , window_height(240)
681 , border_width(e_3DAppearanceSettingBorderWidthNone)
682 , is_transparent_background(false)
683 , poster_image(e_3DPosterImageKeepCurrent)
684 , poster_file_path(L"") {
685 }
686
692 PDF3DLaunchSetting(const PDF3DLaunchSetting& launch_setting)
693 : activation_enable(launch_setting.activation_enable)
694 , activation_disable(launch_setting.activation_disable)
695 , activation_playback(launch_setting.activation_playback)
696 , window_width(launch_setting.window_width)
697 , window_height(launch_setting.window_height)
698 , border_width(launch_setting.border_width)
699 , is_transparent_background(launch_setting.is_transparent_background)
700 , poster_image(launch_setting.poster_image)
701 , poster_file_path(launch_setting.poster_file_path) {
702 }
703
727 PDF3DLaunchSetting(PDF3DActivationEnableSetting activation_enable, PDF3DActivationDisableSetting activation_disable ,
728 PDF3DActivationPlaybackStyleSetting activation_playback, int window_width, int window_height,
729 PDF3DAppearanceSettingBorderWidth border_width, bool is_transparent_background,
730 PDF3DPosterImageSetting poster_image, WString poster_file_path) {
731 this->activation_enable = activation_enable;
732 this->activation_disable = activation_disable;
733 this->activation_playback = activation_playback;
734 this->window_width = window_width;
735 this->window_height = window_height;
736 this->border_width = border_width;
737 this->is_transparent_background = is_transparent_background;
738 this->poster_image = poster_image;
739 this->poster_file_path = poster_file_path;
740 }
741
767 void Set(PDF3DActivationEnableSetting activation_enable, PDF3DActivationDisableSetting activation_disable ,
768 PDF3DActivationPlaybackStyleSetting activation_playback, int window_width, int window_height,
769 PDF3DAppearanceSettingBorderWidth border_width, bool is_transparent_background,
770 PDF3DPosterImageSetting poster_image, WString poster_file_path) {
771 this->activation_enable = activation_enable;
772 this->activation_disable = activation_disable;
773 this->activation_playback = activation_playback;
774 this->window_width = window_width;
775 this->window_height = window_height;
776 this->border_width = border_width;
777 this->is_transparent_background = is_transparent_background;
778 this->poster_image = poster_image;
779 this->poster_file_path = poster_file_path;
780 }
781
789 PDF3DLaunchSetting& operator=(const PDF3DLaunchSetting& launch_setting) {
790 this->activation_enable = launch_setting.activation_enable;
791 this->activation_disable = launch_setting.activation_disable;
792 this->activation_playback = launch_setting.activation_playback;
793 this->window_width = launch_setting.window_width;
794 this->window_height = launch_setting.window_height;
795 this->border_width = launch_setting.border_width;
796 this->is_transparent_background = launch_setting.is_transparent_background;
797 this->poster_image = launch_setting.poster_image;
798 this->poster_file_path = launch_setting.poster_file_path;
799 return *this;
800 }
801
807 PDF3DActivationEnableSetting activation_enable;
808
814 PDF3DActivationDisableSetting activation_disable;
815
821 PDF3DActivationPlaybackStyleSetting activation_playback;
822
826 int window_width;
827
831 int window_height;
832
838 PDF3DAppearanceSettingBorderWidth border_width;
839
844 bool is_transparent_background;
845
851 PDF3DPosterImageSetting poster_image;
852
857 WString poster_file_path;
858 };
859
861 class PDF3DAdvancedSetting FS_FINAL : public Object{
862 public:
868 typedef enum _PDF3DLightingScheme {
870 e_3DLightingSchemeNone = 0,
872 e_3DLightingSchemeFromFile = 1,
874 e_3DLightingSchemeNoLights = 2,
876 e_3DLightingSchemeWhiteLights = 3,
878 e_3DLightingSchemeDayLights = 4,
880 e_3DLightingSchemeHardLights = 5,
882 e_3DLightingSchemePrimaryLights = 6,
884 e_3DLightingSchemeNightLights = 7,
886 e_3DLightingSchemeBlueLights = 8,
888 e_3DLightingSchemeRedLights = 9,
890 e_3DLightingSchemeCubeLights = 10,
892 e_3DLightingSchemeCADLights= 11,
894 e_3DLightingSchemeHeadlamp= 12
895 } PDF3DLightingScheme;
896
902 typedef enum _PDF3DRenderingStyle {
904 e_3DRenderingStyleNone = 0,
906 e_3DRenderingStyleBoundingBox = 1,
908 e_3DRenderingStyleTransparentBoundingBox = 2,
910 e_3DRenderingStyleTransparentBoundingBoxOutline = 3,
912 e_3DRenderingStyleVertices = 4,
914 e_3DRenderingStyleShadedVertices = 5,
916 e_3DRenderingStyleWireframe = 6,
918 e_3DRenderingStyleShadedWireframe = 7,
920 e_3DRenderingStyleSolid = 8,
922 e_3DRenderingStyleTransparent = 9,
924 e_3DRenderingStyleSolidWireframe = 10,
926 e_3DRenderingStyleTransparentWireframe = 11,
928 e_3DRenderingStyleIllustration = 12,
930 e_3DRenderingStyleSolidOutline = 13,
932 e_3DRenderingStyleShadedIllustration = 14,
934 e_3DRenderingStyleHiddenWireframe = 15
935 } PDF3DRenderingStyle;
936
942 typedef enum _PDF3DAnimationStyle {
944 e_3DAnimationStyleNone = 0,
946 e_3DAnimationStyleLoop = 1,
948 e_3DAnimationStyleBounce = 2
949 } PDF3DAnimationStyle;
950
956 typedef enum _PDF3DDefaultViews {
958 e_3DDefaultViewsNoViews = 0,
960 e_3DDefaultViewsLeftTopFrontIsoAllOrtho = 1,
962 e_3DDefaultViewsLeftTopFrontIsoAllPerspective = 2,
964 e_3DDefaultViewsLeftTopFrontOrthoIsoPerspective = 3,
966 e_3DDefaultViewsLeftTopFrontPerspectiveIsoOrtho = 4,
968 e_3DDefaultViewsLeftTopFrontRightBottomBackAllOrtho = 5,
970 e_3DDefaultViewsFromFile = 6
971 } PDF3DDefaultViews;
972
973
975 PDF3DAdvancedSetting()
976 : background_color(0x5E5E5E)
977 , lighting_scheme(e_3DLightingSchemeNone)
978 , rendering_style(e_3DRenderingStyleBoundingBox)
979 , animation_style(e_3DAnimationStyleNone)
980 , default_views(e_3DDefaultViewsNoViews)
981 , is_add_default_views(false)
982 , is_retain_views_and_comments(false)
983 , is_show_tool_bar(true)
984 , is_open_model_tree(false)
985 , script_file_path(L"") {
986 }
987
993 PDF3DAdvancedSetting(const PDF3DAdvancedSetting& advanced_setting)
994 : background_color(advanced_setting.background_color)
995 , lighting_scheme(advanced_setting.lighting_scheme)
996 , rendering_style(advanced_setting.rendering_style)
997 , animation_style(advanced_setting.animation_style)
998 , default_views(advanced_setting.default_views)
999 , is_add_default_views(advanced_setting.is_add_default_views)
1000 , is_retain_views_and_comments(advanced_setting.is_retain_views_and_comments)
1001 , is_show_tool_bar(advanced_setting.is_show_tool_bar)
1002 , is_open_model_tree(advanced_setting.is_open_model_tree)
1003 , script_file_path(advanced_setting.script_file_path) {
1004 }
1005
1013 PDF3DAdvancedSetting& operator=(const PDF3DAdvancedSetting& advanced_setting) {
1014 this->background_color = advanced_setting.background_color;
1015 this->lighting_scheme = advanced_setting.lighting_scheme;
1016 this->rendering_style = advanced_setting.rendering_style;
1017 this->animation_style = advanced_setting.animation_style;
1018 this->default_views = advanced_setting.default_views;
1019 this->is_add_default_views = advanced_setting.is_add_default_views;
1020 this->is_retain_views_and_comments = advanced_setting.is_retain_views_and_comments;
1021 this->is_show_tool_bar = advanced_setting.is_show_tool_bar;
1022 this->is_open_model_tree = advanced_setting.is_open_model_tree;
1023 this->script_file_path = advanced_setting.script_file_path;
1024 return *this;
1025 }
1026
1049 PDF3DAdvancedSetting(foxit::RGB background_color, PDF3DLightingScheme lighting_scheme ,
1050 PDF3DRenderingStyle rendering_style, PDF3DAnimationStyle animation_style,
1051 PDF3DDefaultViews default_views, bool is_add_default_views, bool is_retain_views_and_comments,
1052 bool is_show_tool_bar, bool is_open_model_tree, WString script_file_path) {
1053 this->background_color = background_color;
1054 this->lighting_scheme = lighting_scheme;
1055 this->rendering_style = rendering_style;
1056 this->animation_style = animation_style;
1057 this->default_views = default_views;
1058 this->is_add_default_views = is_add_default_views;
1059 this->is_retain_views_and_comments = is_retain_views_and_comments;
1060 this->is_show_tool_bar = is_show_tool_bar;
1061 this->is_open_model_tree = is_open_model_tree;
1062 this->script_file_path = script_file_path;
1063 }
1088 void Set(foxit::RGB background_color, PDF3DLightingScheme lighting_scheme ,
1089 PDF3DRenderingStyle rendering_style, PDF3DAnimationStyle animation_style,
1090 PDF3DDefaultViews default_views, bool is_add_default_views, bool is_retain_views_and_comments,
1091 bool is_show_tool_bar, bool is_open_model_tree, WString script_file_path) {
1092 this->background_color = background_color;
1093 this->lighting_scheme = lighting_scheme;
1094 this->rendering_style = rendering_style;
1095 this->animation_style = animation_style;
1096 this->default_views = default_views;
1097 this->is_add_default_views = is_add_default_views;
1098 this->is_retain_views_and_comments = is_retain_views_and_comments;
1099 this->is_show_tool_bar = is_show_tool_bar;
1100 this->is_open_model_tree = is_open_model_tree;
1101 this->script_file_path = script_file_path;
1102 }
1106 foxit::RGB background_color;
1107
1113 PDF3DLightingScheme lighting_scheme;
1114
1120 PDF3DRenderingStyle rendering_style;
1121
1127 PDF3DAnimationStyle animation_style;
1128
1134 PDF3DDefaultViews default_views;
1135
1140 bool is_add_default_views;
1141
1146 bool is_retain_views_and_comments;
1147
1152 bool is_show_tool_bar;
1153
1158 bool is_open_model_tree;
1159
1161 WString script_file_path;
1162 };
1163
1172 class PDF3DContext FS_FINAL : public Base{
1173 public:
1175 explicit PDF3DContext(const pdf::PDFDoc& doc);
1176
1182 PDF3DContext(const PDF3DContext& other);
1183
1185 ~PDF3DContext();
1186
1194 PDF3DContext& operator=(const PDF3DContext& other);
1195
1203 bool operator==(const PDF3DContext& other) const;
1204
1212 bool operator!=(const PDF3DContext& other) const;
1213
1221 bool IsEmpty() const;
1222
1231 PDF3DAnnotArray GetPage3DAnnotArray(int page_index);
1232
1240 void Invalidate();
1241
1254 PDF3DAnnot Add3DAnnot(const wchar_t* threeD_file_path, int page_index, foxit::RectF rectf, void* screen_canvas_parent,
1255 PDF3DLaunchSetting launch_setting, PDF3DAdvancedSetting advanced_setting);
1256
1270 PDF3DAnnot Add3DAnnot(foxit::common::file::ReaderCallback* threeD_file_read, int page_index, foxit::RectF rectf, void* screen_canvas_parent, PDF3DLaunchSetting launch_setting, PDF3DAdvancedSetting advanced_setting);
1271
1272 // User is strongly recommended NOT to use this method; otherwise unknown situation may occur.
1273 explicit PDF3DContext(FS_HANDLE handle = NULL);
1274 };
1275 } //pdf3d
1276 } //addon
1277 } //foxit
1278 #endif //FS_3DPDF_H_
1279 #endif //defined(_WIN32) || defined(_WIN64)
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleWireframe
Wireframe.
Definition: fs_pdf3d.h:916
foxit::addon::pdf3d::PDF3DAnnotInstance
Definition: fs_pdf3d.h:219
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleSolidWireframe
Solid wireframe.
Definition: fs_pdf3d.h:924
foxit::addon::pdf3d::PDF3DAdvancedSetting::lighting_scheme
PDF3DLightingScheme lighting_scheme
The lighting scheme setting for 3D. Please refer to values starting from PDF3DAdvancedSetting::e_3DLi...
Definition: fs_pdf3d.h:1113
foxit::addon::pdf3d::PDF3DAdvancedSetting::default_views
PDF3DDefaultViews default_views
The default views setting for 3D. Please refer to values starting from PDF3DAdvancedSetting::e_3DDefa...
Definition: fs_pdf3d.h:1134
foxit::addon::pdf3d::PDF3DAnnotViewData::PDF3DAnnotViewData
PDF3DAnnotViewData()
Constructor.
Definition: fs_pdf3d.h:35
foxit::addon::pdf3d::PDF3DAnnotInstance::PDF3DRenderMode
PDF3DRenderMode
Enumeration for the 3D render mode.
Definition: fs_pdf3d.h:246
foxit::addon::pdf3d::PDF3DAnnotInstance::e_ControllerSpin
spin.
Definition: fs_pdf3d.h:230
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeShadedVertices
Shaded vertices.
Definition: fs_pdf3d.h:276
foxit::addon::pdf3d::PDF3DAnnotInstance::OnRButtonUp
void OnRButtonUp(int flag, PointF point)
Call this function when releasing the right button.
foxit::addon::pdf3d::PDF3DLaunchSetting::window_width
int window_width
The window width setting for 3D. Default value is 320.
Definition: fs_pdf3d.h:826
foxit::addon::pdf3d::PDF3DAnnotInstance::e_ControllerWalk
walk.
Definition: fs_pdf3d.h:236
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeTransparentBoundingBox
Transparent bounding box.
Definition: fs_pdf3d.h:260
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DLightingScheme
PDF3DLightingScheme
Enumeration for lighting scheme for the 3D advanced setting type.
Definition: fs_pdf3d.h:868
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DActivationDisableSetting
PDF3DActivationDisableSetting
Enumeration for activation disable setting for the 3D launch setting type.
Definition: fs_pdf3d.h:622
foxit::addon::pdf3d::PDF3DAnnotInstance::e_ControllerFly
fly.
Definition: fs_pdf3d.h:238
foxit::Object
CFX_Object Object
Object type.
Definition: fs_basictypes.h:220
foxit::addon::pdf3d::PDF3DAnnotInstance::operator=
PDF3DAnnotInstance & operator=(const PDF3DAnnotInstance &other)
Assign operator.
fs_pdfdoc.h
Header file for PDF document related definitions and classes.
foxit::addon::pdf3d::PDF3DAnnotViewData::name
WString name
The name of the view, which is the unique name.
Definition: fs_pdf3d.h:63
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeDayLights
Day lights.
Definition: fs_pdf3d.h:878
foxit::addon::pdf3d::PDF3DAdvancedSetting::background_color
foxit::RGB background_color
The background color.Default value: 0x5e5e5e.
Definition: fs_pdf3d.h:1106
foxit::addon::pdf3d::PDF3DAnnotInstance::SetRenderMode
void SetRenderMode(PDF3DRenderMode render_mode)
Set model render mode.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeWhiteLights
White lights.
Definition: fs_pdf3d.h:876
foxit::addon::pdf3d::PDF3DContext::GetPage3DAnnotArray
PDF3DAnnotArray GetPage3DAnnotArray(int page_index)
Get 3d annot objects array by page index.
foxit::addon::pdf3d::PDF3DAnnotInstance::GetPresetViewList
PDF3DAnnotViewDataArray GetPresetViewList()
Get the list of all preset views in the 3D model.
foxit::addon::pdf3d::PDF3DContext::Add3DAnnot
PDF3DAnnot Add3DAnnot(const wchar_t *threeD_file_path, int page_index, foxit::RectF rectf, void *screen_canvas_parent, PDF3DLaunchSetting launch_setting, PDF3DAdvancedSetting advanced_setting)
Add a 3D annotation to the PDF page.
foxit::addon::pdf3d::PDF3DAnnotInstance::PDF3DAnnotInstance
PDF3DAnnotInstance()
Constructor.
Definition: fs_pdf3d.h:281
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleTransparentBoundingBoxOutline
Transparent bounding box outline.
Definition: fs_pdf3d.h:910
foxit::RGB
uint32 RGB
RGB color type, 24 bits, ((b) | ((g) << 8) | ((r) << 16)))
Definition: fs_basictypes.h:211
foxit::addon::pdf3d::PDF3DAdvancedSetting::animation_style
PDF3DAnimationStyle animation_style
The activation animation style setting for 3D. Please refer to values starting from PDF3DAdvancedSett...
Definition: fs_pdf3d.h:1127
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleShadedVertices
Shaded vertices.
Definition: fs_pdf3d.h:914
foxit::addon::pdf3d::PDF3DAnnotInstance::ApplyPresetView
void ApplyPresetView(const PDF3DAnnotViewData &view_data)
Apply the preset view .
CFX_PSVTemplate
Definition: fx_coordinates.h:30
foxit::addon::pdf3d::PDF3DAnnotViewData
This class represents the data of a 3D annotation view.
Definition: fs_pdf3d.h:32
foxit::addon::pdf3d::PDF3DAnnot
This class represents PDF 3D annotation.
Definition: fs_pdf3d.h:494
foxit::addon::pdf3d::PDF3DAnnotViewData::display_name
WString display_name
The display name of the view. This name can be duplicated with other views.
Definition: fs_pdf3d.h:60
foxit::addon::pdf3d::PDF3DAnnotInstance::OnMouseWheel
void OnMouseWheel(int flag, int delta, PointF point)
Call this function when scrolling the mouse wheel.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleVertices
Vertices.
Definition: fs_pdf3d.h:912
IFX_FileRead
File reading interface.
Definition: fx_stream.h:587
CFX_WideString
WIDE STRING CLASS.
Definition: fx_string.h:1461
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleShadedWireframe
Shaded wireframe.
Definition: fs_pdf3d.h:918
foxit::addon::pdf3d::PDF3DAdvancedSetting::script_file_path
WString script_file_path
This flag indicates the script file path.
Definition: fs_pdf3d.h:1161
foxit::addon::pdf3d::PDF3DContext
Definition: fs_pdf3d.h:1172
foxit::addon::pdf3d::PDF3DAdvancedSetting::rendering_style
PDF3DRenderingStyle rendering_style
The activation rendering style setting for 3D. Please refer to values starting from PDF3DAdvancedSett...
Definition: fs_pdf3d.h:1120
foxit::addon::pdf3d::PDF3DAnnotInstanceArray
This class represents an array of PDF3DAnnotInstance.
Definition: fs_pdf3d.h:491
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsLeftTopFrontRightBottomBackAllOrtho
Left,top,right,front,bottom,back(all ortho).
Definition: fs_pdf3d.h:968
foxit::addon::pdf3d::PDF3DAnnotViewData::PDF3DAnnotViewData
PDF3DAnnotViewData(const PDF3DAnnotViewData &other)
Constructor, with another 3D annot view data object.
Definition: fs_pdf3d.h:42
foxit::addon::pdf3d::PDF3DLaunchSetting::poster_file_path
WString poster_file_path
The file path of poster image. This field is valid only when poster_image is set to PDF3DLaunchSettin...
Definition: fs_pdf3d.h:857
foxit::pdf::PDFDoc
Definition: fs_pdfdoc.h:776
foxit::addon::pdf3d::PDF3DLaunchSetting::window_height
int window_height
The window height setting for 3D. Default value is 240.
Definition: fs_pdf3d.h:831
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsNoViews
No views.
Definition: fs_pdf3d.h:958
foxit::addon::pdf3d::PDF3DLaunchSetting::is_transparent_background
bool is_transparent_background
This flag indicates whether the 3D content background is transparent. true means transparent,...
Definition: fs_pdf3d.h:844
foxit::addon::pdf3d::PDF3DAnnotInstance::OnLButtonDown
void OnLButtonDown(int flag, PointF point)
Call this function when pressing the left button.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeHeadlamp
Headlamp.
Definition: fs_pdf3d.h:894
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleTransparent
Transparent.
Definition: fs_pdf3d.h:922
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeHiddenWireframe
Hidden wireframe.
Definition: fs_pdf3d.h:268
foxit::addon::pdf3d::PDF3DAnnotInstance::OnRButtonDown
void OnRButtonDown(int flag, PointF point)
Call this function when pressing the right button.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DAnimationStyleLoop
Loop.
Definition: fs_pdf3d.h:946
foxit::addon::pdf3d::PDF3DAnnotInstance::ActivateCanvas
FX_HWND ActivateCanvas(FX_HWND screen_canvas_parent)
Activate canvas.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeCADLights
CAD lights.
Definition: fs_pdf3d.h:892
foxit::addon::pdf3d::PDF3DLaunchSetting::activation_enable
PDF3DActivationEnableSetting activation_enable
The activation enable setting for 3D. Please refer to values starting from PDF3DLaunchSetting::e_3DAc...
Definition: fs_pdf3d.h:807
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeSolidOutline
Solid outline.
Definition: fs_pdf3d.h:252
foxit::addon::pdf3d::PDF3DLaunchSetting::activation_disable
PDF3DActivationDisableSetting activation_disable
The activation disable setting for 3D. Please refer to values starting from PDF3DLaunchSetting::e_3DA...
Definition: fs_pdf3d.h:814
foxit::addon::pdf3d::PDF3DAnnotViewDataArray
This class represents an array of PDF3DAnnotViewData.
Definition: fs_pdf3d.h:67
foxit::addon::pdf3d::PDF3DAdvancedSetting::is_retain_views_and_comments
bool is_retain_views_and_comments
This flag indicates whether to retain views and comments. true means to retain, while false means not...
Definition: fs_pdf3d.h:1146
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsLeftTopFrontIsoAllPerspective
Left,top,front,Iso(all perspective).
Definition: fs_pdf3d.h:962
foxit::addon::pdf3d::PDF3DAdvancedSetting::is_add_default_views
bool is_add_default_views
This flag indicates whether to add default views. true means to add, while false means not....
Definition: fs_pdf3d.h:1140
operator==
bool operator==(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are equal.
Definition: fs_basictypes.h:128
foxit::addon::pdf3d::PDF3DAdvancedSetting::Set
void Set(foxit::RGB background_color, PDF3DLightingScheme lighting_scheme, PDF3DRenderingStyle rendering_style, PDF3DAnimationStyle animation_style, PDF3DDefaultViews default_views, bool is_add_default_views, bool is_retain_views_and_comments, bool is_show_tool_bar, bool is_open_model_tree, WString script_file_path)
Set the values.
Definition: fs_pdf3d.h:1088
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeBlueLights
Blue lights.
Definition: fs_pdf3d.h:886
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleTransparentWireframe
Transparent wireframe.
Definition: fs_pdf3d.h:926
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeCubeLights
Cube lights.
Definition: fs_pdf3d.h:890
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeShadedIllustration
Shaded illustration.
Definition: fs_pdf3d.h:272
foxit::addon::pdf3d::ModelNode
Definition: fs_pdf3d.h:74
foxit::addon::pdf3d::PDF3DAdvancedSetting::is_open_model_tree
bool is_open_model_tree
This flag indicates whether to open model tree. true means to open, while false means not....
Definition: fs_pdf3d.h:1158
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DPosterImageSetting
PDF3DPosterImageSetting
Enumeration for poster image for the 3D launch setting type.
Definition: fs_pdf3d.h:664
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DAppearanceSettingBorderWidth
PDF3DAppearanceSettingBorderWidth
Enumeration for appearance setting for border width for the 3D launch setting type.
Definition: fs_pdf3d.h:648
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DAdvancedSetting
PDF3DAdvancedSetting()
Constructor.
Definition: fs_pdf3d.h:975
fs_annot.h
Header file for annotation related definitions and classes.
foxit::addon::pdf3d::PDF3DAdvancedSetting
Definition: fs_pdf3d.h:861
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeTransparent
Transparent.
Definition: fs_pdf3d.h:254
foxit::addon::pdf3d::PDF3DAdvancedSetting::is_show_tool_bar
bool is_show_tool_bar
This flag indicates whether to show tool bar. true means to show, while false means not....
Definition: fs_pdf3d.h:1152
foxit::FX_HWND
void * FX_HWND
Window handle: HWND.
Definition: fs_basictypes.h:217
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DLaunchSetting
PDF3DLaunchSetting()
Constructor.
Definition: fs_pdf3d.h:675
foxit::addon::pdf3d::ModelNode::ModelNode
ModelNode()
Constructor.
Definition: fs_pdf3d.h:109
foxit::addon::pdf3d::PDF3DLaunchSetting::operator=
PDF3DLaunchSetting & operator=(const PDF3DLaunchSetting &launch_setting)
Assign operator.
Definition: fs_pdf3d.h:789
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleSolid
Solid.
Definition: fs_pdf3d.h:920
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeNightLights
Night lights.
Definition: fs_pdf3d.h:884
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeTransparentBoundingBoxOutline
Transparent bounding box outline.
Definition: fs_pdf3d.h:262
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemePrimaryLights
Primary lights.
Definition: fs_pdf3d.h:882
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleNone
None.
Definition: fs_pdf3d.h:904
foxit::addon::pdf3d::PDF3DContext::operator==
bool operator==(const PDF3DContext &other) const
Equal operator.
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DRenderingStyle
PDF3DRenderingStyle
Enumeration for rendering style for the 3D advanced setting type.
Definition: fs_pdf3d.h:902
foxit::addon::pdf3d::PDF3DContext::~PDF3DContext
~PDF3DContext()
Destructor.
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DAdvancedSetting
PDF3DAdvancedSetting(const PDF3DAdvancedSetting &advanced_setting)
Constructor, with another 3D advanced setting object.
Definition: fs_pdf3d.h:993
foxit::addon::pdf3d::PDF3DAnnotInstance::operator==
bool operator==(const PDF3DAnnotInstance &other) const
Equal operator.
foxit::addon::pdf3d::PDF3DContext::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::FS_HANDLE
void * FS_HANDLE
Handle type.
Definition: fs_basictypes.h:213
foxit::addon::pdf3d::PDF3DLaunchSetting::activation_playback
PDF3DActivationPlaybackStyleSetting activation_playback
The activation playback setting for 3D. Please refer to values starting from PDF3DLaunchSetting::e_3D...
Definition: fs_pdf3d.h:821
fs_common.h
Header file for common definitions and classes.
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeTransparentWireframe
Transparent wireframe.
Definition: fs_pdf3d.h:256
foxit::addon::pdf3d::PDF3DAnnotInstance::operator!=
bool operator!=(const PDF3DAnnotInstance &other) const
Not equal operator.
foxit::addon::pdf3d::PDF3DAnnotInstance::GetRootNode
ModelNode GetRootNode()
Get the root node of the 3D model tree structure.
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DAnimationStyle
PDF3DAnimationStyle
Enumeration for animation style for the 3D advanced setting type.
Definition: fs_pdf3d.h:942
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DLaunchSetting
PDF3DLaunchSetting(PDF3DActivationEnableSetting activation_enable, PDF3DActivationDisableSetting activation_disable, PDF3DActivationPlaybackStyleSetting activation_playback, int window_width, int window_height, PDF3DAppearanceSettingBorderWidth border_width, bool is_transparent_background, PDF3DPosterImageSetting poster_image, WString poster_file_path)
Constructor with parameter.
Definition: fs_pdf3d.h:727
foxit::addon::pdf3d::PDF3DContext::operator=
PDF3DContext & operator=(const PDF3DContext &other)
Assign operator.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleHiddenWireframe
Hidden wireframe.
Definition: fs_pdf3d.h:934
FX_RECT
Definition: fx_coordinates.h:596
foxit::addon::pdf3d::PDF3DAnnotInstance::OnMouseMove
void OnMouseMove(int flag, PointF point)
Call this function when moving the mouse.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeFromFile
From file.
Definition: fs_pdf3d.h:872
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeSolidWireframe
Solid wireframe.
Definition: fs_pdf3d.h:250
foxit::addon::pdf3d::PDF3DAnnotInstance::e_ControllerRotate
rotate.
Definition: fs_pdf3d.h:228
foxit::Base
Definition: fs_basictypes.h:451
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeIllustration
Illustration.
Definition: fs_pdf3d.h:270
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsLeftTopFrontIsoAllOrtho
Left,top,front,Iso(all ortho).
Definition: fs_pdf3d.h:960
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DActivationEnableSetting
PDF3DActivationEnableSetting
Enumeration for activation enable setting for the 3D launch setting type.
Definition: fs_pdf3d.h:608
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsLeftTopFrontOrthoIsoPerspective
Left,top,front,(ortho)Iso(perspective).
Definition: fs_pdf3d.h:964
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleShadedIllustration
Shaded illustration.
Definition: fs_pdf3d.h:932
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsLeftTopFrontPerspectiveIsoOrtho
Left,top,front,(perspective)Iso(ortho).
Definition: fs_pdf3d.h:966
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeBoundingBox
Bounding box.
Definition: fs_pdf3d.h:258
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DAnimationStyleBounce
Bounce.
Definition: fs_pdf3d.h:948
foxit::pdf::annots::Annot
Definition: fs_annot.h:1006
foxit::addon::pdf3d::PDF3DAnnotInstance::~PDF3DAnnotInstance
~PDF3DAnnotInstance()
Destructor.
foxit::addon::pdf3d::PDF3DLaunchSetting::poster_image
PDF3DPosterImageSetting poster_image
The poster image. Please refer to values starting from PDF3DLaunchSetting::e_3DPosterImageKeepCurrent...
Definition: fs_pdf3d.h:851
foxit::addon::pdf3d::PDF3DAnnotInstance::e_ControllerZoom
zoom.
Definition: fs_pdf3d.h:234
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DLaunchSetting
PDF3DLaunchSetting(const PDF3DLaunchSetting &launch_setting)
Constructor, with another 3D launch setting object.
Definition: fs_pdf3d.h:692
foxit::addon::pdf3d::PDF3DAnnotInstance::UpdateCanvas
void UpdateCanvas(RectI rect)
Update the canvas.
foxit::addon::pdf3d::PDF3DAnnotInstance::e_ControllerPan
pan.
Definition: fs_pdf3d.h:232
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleBoundingBox
Bounding box.
Definition: fs_pdf3d.h:906
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DAnimationStyleNone
None.
Definition: fs_pdf3d.h:944
foxit
Foxit namespace.
Definition: fs_pdf3d.h:26
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleSolidOutline
Solid outline.
Definition: fs_pdf3d.h:930
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DAdvancedSetting
PDF3DAdvancedSetting(foxit::RGB background_color, PDF3DLightingScheme lighting_scheme, PDF3DRenderingStyle rendering_style, PDF3DAnimationStyle animation_style, PDF3DDefaultViews default_views, bool is_add_default_views, bool is_retain_views_and_comments, bool is_show_tool_bar, bool is_open_model_tree, WString script_file_path)
Constructor with parameter.
Definition: fs_pdf3d.h:1049
foxit::addon::pdf3d::PDF3DAnnotViewData::operator=
PDF3DAnnotViewData & operator=(const PDF3DAnnotViewData &data)
Assign operator.
Definition: fs_pdf3d.h:53
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleIllustration
Illustration.
Definition: fs_pdf3d.h:928
foxit::addon::pdf3d::PDF3DLaunchSetting
Definition: fs_pdf3d.h:601
foxit::addon::pdf3d::PDF3DLaunchSetting::border_width
PDF3DAppearanceSettingBorderWidth border_width
The border width setting for 3D. Please refer to values starting from PDF3DLaunchSetting::e_3DAppeara...
Definition: fs_pdf3d.h:838
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeSolid
Solid.
Definition: fs_pdf3d.h:248
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeWireframe
Wireframe.
Definition: fs_pdf3d.h:264
foxit::addon::pdf3d::PDF3DAdvancedSetting::operator=
PDF3DAdvancedSetting & operator=(const PDF3DAdvancedSetting &advanced_setting)
Assign operator.
Definition: fs_pdf3d.h:1013
foxit::addon::pdf3d::PDF3DLaunchSetting::Set
void Set(PDF3DActivationEnableSetting activation_enable, PDF3DActivationDisableSetting activation_disable, PDF3DActivationPlaybackStyleSetting activation_playback, int window_width, int window_height, PDF3DAppearanceSettingBorderWidth border_width, bool is_transparent_background, PDF3DPosterImageSetting poster_image, WString poster_file_path)
Set the values.
Definition: fs_pdf3d.h:767
NULL
#define NULL
The null-pointer value.
Definition: fx_system.h:792
foxit::addon::pdf3d::PDF3DContext::Invalidate
void Invalidate()
Refresh 3D Objects.
foxit::addon::pdf3d::PDF3DAnnotInstance::SetController
void SetController(PDF3DController tool_tag)
Set controller.
operator!=
bool operator!=(const char *str1, const CFX_ByteString &str2)
Check if two byte strings are not equal.
Definition: fs_basictypes.h:140
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DDefaultViewsFromFile
Views from file.
Definition: fs_pdf3d.h:970
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeVertices
Vertices.
Definition: fs_pdf3d.h:274
foxit::addon::pdf3d::PDF3DAnnotInstance::IsEmpty
bool IsEmpty() const
Check whether current object is empty or not.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeNoLights
No lights.
Definition: fs_pdf3d.h:874
foxit::addon::pdf3d::PDF3DContext::PDF3DContext
PDF3DContext(const pdf::PDFDoc &doc)
Constructor, with a PDF document object.
foxit::addon::pdf3d::PDF3DAnnotInstance::PDF3DController
PDF3DController
Enumeration for the 3D controller tool.
Definition: fs_pdf3d.h:226
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeNone
None.
Definition: fs_pdf3d.h:870
foxit::addon::pdf3d::PDF3DAdvancedSetting::PDF3DDefaultViews
PDF3DDefaultViews
Enumeration for default views for the 3D advanced setting type.
Definition: fs_pdf3d.h:956
foxit::addon::pdf3d::PDF3DContext::operator!=
bool operator!=(const PDF3DContext &other) const
Not equal operator.
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeRedLights
Red lights.
Definition: fs_pdf3d.h:888
foxit::addon::pdf3d::PDF3DAnnotInstance::e_RenderModeShadedWireframe
Shaded wireframe.
Definition: fs_pdf3d.h:266
foxit::addon::pdf3d::PDF3DLaunchSetting::PDF3DActivationPlaybackStyleSetting
PDF3DActivationPlaybackStyleSetting
Enumeration for activation playback style for the 3D launch setting type.
Definition: fs_pdf3d.h:636
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DLightingSchemeHardLights
Hard lights.
Definition: fs_pdf3d.h:880
foxit::addon::pdf3d::PDF3DAnnotInstance::ResetDefaultView
void ResetDefaultView()
Reset the view back to the default view, the 3D model will be reset to its default state.
foxit::addon::pdf3d::PDF3DAnnotInstance::OnLButtonUp
void OnLButtonUp(int flag, PointF point)
Call this function when releasing the left button.
CFX_FloatRect
Definition: fx_coordinates.h:771
foxit::addon::pdf3d::PDF3DAdvancedSetting::e_3DRenderingStyleTransparentBoundingBox
Transparent bounding box.
Definition: fs_pdf3d.h:908