Enum Pdf3DRenderStyle
- Namespace
- Syncfusion.Pdf.Interactive
- Assembly
- Syncfusion.Pdf.Portable.dll
Specifies the available rendering style of the 3D artwork.
public enum Pdf3DRenderStyle
Fields
BoundingBox = 4
Displays the bounding box edges of each node, aligned with the axes of the local coordinate space for that node.
HiddenWireframe = 9
Displays edges in a single color, though removes back-facing and obscured edges.
Illustration = 12
Displays silhouette edges with surfaces, removes obscured lines.
ShadedIllustration = 14
Displays silhouette edges with lit and textured surfaces and an additional emissive term to remove poorly lit areas of the artwork.
ShadedVertices = 11
Displays only vertices, though uses their vertex color and applies lighting.
ShadedWireframe = 8
Displays only edges, though interpolates their color between their two vertices and applies lighting.
Solid = 0
Displays textured and lit geometric shapes. In the case of artwork that conforms to the Universal 3D File Format specification, these shapes are triangles.
SolidOutline = 13
Displays silhouette edges with lit and textured surfaces, removes obscured lines.
SolidWireframe = 1
Displays textured and lit geometric shapes (triangles) with single color edges on top of them.
Transparent = 2
Displays textured and lit geometric shapes (triangles) with an added level of transparency.
TransparentBoundingBox = 5
Displays bounding boxes faces of each node, aligned with the axes of the local coordinate space for that node, with an added level of transparency.
TransparentBoundingBoxOutline = 6
Displays bounding boxes edges and faces of each node, aligned with the axes of the local coordinate space for that node, with an added level of transparency.
TransparentWireframe = 3
Displays textured and lit geometric shapes (triangles) with an added level of transparency, with single color opaque edges on top of it.
Vertices = 10
Displays only vertices in a single color.
Wireframe = 7
Displays only edges in a single color.
Examples
//Create a new PDF document.
PdfDocument document = new PdfDocument();
//Create a new page .
PdfPage page = document.Pages.Add();
//Create a new Pdf3D Annotation.
Pdf3DAnnotation annotation = new Pdf3DAnnotation(new RectangleF(10, 50, 300, 150), @"Input.u3d");
//Create a new Pdf3DRendermode.
Pdf3DRendermode renderMode = new Pdf3DRendermode();
renderMode.Style = Pdf3DRenderStyle.Solid;
renderMode.AuxilaryColor = new PdfColor(Color.Green);
renderMode.FaceColor = new PdfColor(Color.Black);
renderMode.CreaseValue = 10f;
//Create a new Pdf3DView
Pdf3DView view = new Pdf3DView();
view.CameraToWorldMatrix = new float[] { -0.382684f, 0.92388f, -0.0000000766026f, 0.18024f, 0.0746579f, 0.980785f, 0.906127f, 0.37533f, -0.19509f, -100, -112.432f, 45.6829f };
view.RenderMode = renderMode;
annotation.Views.Add(view);
page.Annotations.Add(annotation);
//Save the document to disk.
document.Save("Output.pdf");
//close the document
document.Close(true);
'Create a new PDF document.
Dim document As New PdfDocument()
'Create a new page .
Dim page As PdfPage = document.Pages.Add()
'Create a new Pdf3D Annotation.
Dim annotation As New Pdf3DAnnotation(New RectangleF(10, 50, 300, 150), "Input.u3d")
'Create a new Pdf3DRendermode.
Dim renderMode As New Pdf3DRendermode()
renderMode.Style = Pdf3DRenderStyle.Solid
renderMode.AuxilaryColor = New PdfColor(Color.Green)
renderMode.FaceColor = New PdfColor(Color.Black)
renderMode.CreaseValue = 10f
'Create a new Pdf3DView
Dim view As New Pdf3DView()
view.CameraToWorldMatrix = New Single() { -0.382684F, 0.92388F, -7.66026E-08F, 0.18024F, 0.0746579F, 0.980785F, 0.906127F, 0.37533F, -0.19509F, -100, -112.432F, 45.6829F}
view.RenderMode = renderMode
annotation.Views.Add(view)
page.Annotations.Add(annotation)
'Save the document to disk.
document.Save("Output.pdf")
'close the document
document.Close(True)