• Home
    • View
    • Login
    This page
    • Normal
    • Export PDF
    • Export Word
    • Attachments
    • Page Information

    Loading...
  1. Dashboard
  2. OpenJFX
  3. Main
  4. Discussions
  5. 3D Features

Page History

Versions Compared

Old Version 11

changes.mady.by.user J. Duke

Saved on Oct 05, 2012

compared with

New Version 12

changes.mady.by.user J. Duke

Saved on Oct 05, 2012

  • Previous Change: Difference between versions 10 and 11
  • Next Change: Difference between versions 12 and 13
  • View Page History

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
// Create the arrays of positions, texCoords
float[] positions = createPositions();
float[] texCoords = createUVs();

// Create faces (indices into the positions, texCoord arrays)
int[] faces = createFaces();

// Create a mesh
TriangleMesh mesh = new TriangleMesh();
mesh.setPositions(positions);
mesh.setTexCoords(texCoords);
mesh.setFaces(faces);

// Create meshView
MeshView mv = new MeshView(mesh);

Using Predefined Shapes

Code Block

// Create a sphere with the given radius
Sphere sphere = new Sphere(10.0);

// Create a sphere with the given radius, number of divisions
Sphere sphere = new Sphere(10.0, 40);

// Create a cylinder with the given radius, and height
Sphere sphere = new Cylinder(10.0, 30.0);

// Create a box with the given width, height, and depth
Box box = new Box(1.0, 1.0, 1.0);

// NOTE: Predefined 3D shapes are centered at (0,0,0)

3D attributes

XXXXXXXXXXXx

Overview
Content Tools
ThemeBuilder

Terms of Use
• License: GPLv2
• Privacy • Trademarks • Contact Us

Powered by a free Atlassian Confluence Open Source Project License granted to https://www.atlassian.com/software/views/opensource-community-additional-license-offer. Evaluate Confluence today.

  • Kolekti ThemeBuilder Powered by Atlassian Confluence 8.5.23
  • Kolekti ThemeBuilder printed.by.atlassian.confluence
  • Report a bug
  • Atlassian News
Atlassian
Kolekti ThemeBuilder EngineAtlassian Confluence
{"serverDuration": 378, "requestCorrelationId": "7cfdccb9c6051b8d"}