How to draw cylinder using openGL


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu How to draw cylinder using openGL
# 1  
Old 11-12-2009
Error How to draw cylinder using openGL

Hi Sir,

i am new to openGL, i want to know how to draw cylinder using openGL code in C or C++..
And i have to insert bitmap images on cylinder..
How to do this .. please guide me ...

Thanking You in advance ..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

Sector,cylinder,track information

Hi all, I am trying to get below information from linux machine, could you please assist me to get this information using a command(s) or small script: SectorsPerTrack TotalCylinders TotalHeads TotalTracks TracksPerCylinder i am aware of fdisk -l command but the information provided by... (1 Reply)
Discussion started by: omkar.jadhav
1 Replies

2. Red Hat

Warning: extended partition does not start at a cylinder boundary.

Can you please help me to remove this error. Disk /dev/sda: 64.4 GB, 64424509440 bytes 255 heads, 63 sectors/track, 7832 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk... (4 Replies)
Discussion started by: karthik9358
4 Replies

3. Programming

Draw multicolor line

Hello. I need to draw many lines with multicolor (color is set by some pixmap (xpm)) on C++ with standart libs. Horizontal lines are drawing succsessfully with GC and XSetTile. But non-horizontal - no good. I rotate pixmap for all lines and then XSetTile for each line with own pixmap, but it's... (1 Reply)
Discussion started by: Yuriy
1 Replies

4. Solaris

Solaris 8 and openGL

Hi everybody, Sorry to bother you one more time, but I have a problem with my Solaris 8 installation. Actually, Solaris works well, I can start X and access my desktop (CDE), but I'm having troubles using Cadds (a CAO software). Cadds works, but the 3D visualization is very slow compare to... (4 Replies)
Discussion started by: firstpost
4 Replies

5. Solaris

Partition 0 not aligned on cylinder boundary: "

hi Guys .. user want mirror disk c3t9d0 (running ) to c2t9d0 (fresh hdd). when i tried to bash : prtvtoc /dev/rdsk/c3t9d0s2 | fmthard -s- /dev/rdsk/c2t9d0s2 it showing following error Partition 0 not aligned on cylinder boundary: " 0 4 222 ..... unable to mirror .... plz... (1 Reply)
Discussion started by: coolboys
1 Replies

6. Solaris

Increase root partition by moving starting cylinder

I am trying to expand the root partition on Solaris 10. I can expand root partition using format/partition command, but usually increasing cylinders on partition is done on back end. In this case I would have to expand from the front end following the table below, meaning I would have to move the... (12 Replies)
Discussion started by: mjaminal
12 Replies

7. What is on Your Mind?

Do you draw flowcharts

Do you draw flowcharts while you do the programming , design new network or simmilar ? (8 Replies)
Discussion started by: solaris_user
8 Replies

8. Programming

Draw a 3D cylinder using openGL.

Hi, please give me, how to code to draw 3D cylinder in openGL, that should be rotated in x-direction. waiting for your reply .. (2 Replies)
Discussion started by: Ravikishore
2 Replies

9. Ubuntu

i am new to opengl , how to work opengl in ubuntu

Hi, i am new to opengl, how to work openGL in ubuntu ,, i am not getting which packages as to be install and how to install those packages. and how to work with small programs.. Please guide me ,,, it will appriceated ... (7 Replies)
Discussion started by: Ravikishore
7 Replies

10. Solaris

Cylinder Group Size reduces in UFS.

Hi all, I am working on Solaris 8 . Its default file system is UFS. My problem is regarding to the file system. I create two partition 1) / 1.2 Gb and 2) /home 4.5 GB In root partition there were 76 Cylinder groups ,when I was traversing the Cylinder Groups I found that the length of one cylinder... (2 Replies)
Discussion started by: sundeep saini
2 Replies
Login or Register to Ask a Question
SbCylinderProjector(3)						       Coin						    SbCylinderProjector(3)

NAME
SbCylinderProjector - The SbCylinderProjector class is the abstract base class for mapping to cylindrical surfaces. The cylinder projectors map 2D points to various surface types based on cylindrical shapes. SYNOPSIS
#include <Inventor/projectors/SbCylinderProjector.h> Inherits SbProjector. Inherited by SbCylinderSectionProjector, and SbCylinderSheetProjector. Public Member Functions virtual SbVec3f project (const SbVec2f &point)=0 SbVec3f projectAndGetRotation (const SbVec2f &point, SbRotation &rot) virtual SbRotation getRotation (const SbVec3f &point1, const SbVec3f &point2)=0 void setCylinder (const SbCylinder &cyl) const SbCylinder & getCylinder (void) const void setOrientToEye (const SbBool orienttoeye) SbBool isOrientToEye (void) const void setFront (const SbBool infront) SbBool isFront (void) const SbBool isPointInFront (const SbVec3f &point) const virtual void setWorkingSpace (const SbMatrix &space) Protected Member Functions SbCylinderProjector (const SbBool orienttoeye) SbCylinderProjector (const SbCylinder &cylinder, const SbBool orienttoeye) SbBool intersectCylinderFront (const SbLine &line, SbVec3f &result) Protected Attributes SbBool intersectFront SbCylinder cylinder SbBool orientToEye SbBool needSetup SbVec3f lastPoint Detailed Description The SbCylinderProjector class is the abstract base class for mapping to cylindrical surfaces. The cylinder projectors map 2D points to various surface types based on cylindrical shapes. See also: SbSphereProjector Constructor &; Destructor Documentation SbCylinderProjector::SbCylinderProjector (const SbBoolorienttoeye) [protected] Default constructor sets up a cylinder along the Y axis with height 1. SbCylinderProjector::SbCylinderProjector (const SbCylinder &cylinder, const SbBoolorienttoeye) [protected] Constructor taking an explicit cylinder projection definition. Member Function Documentation virtual SbVec3f SbCylinderProjector::project (const SbVec2f &point) [pure virtual] Project the 2D point from normalized viewport coordinates to a 3D point. The mapping will be done in accordance with the type of the projector. Implements SbProjector. Implemented in SbCylinderSectionProjector, SbCylinderPlaneProjector, and SbCylinderSheetProjector. SbVec3f SbCylinderProjector::projectAndGetRotation (const SbVec2f &point, SbRotation &rot) Project the 2D point to a 3D coordinate on the cylindrical surface, and find the rotation from the last projection to this one. See also: project(), getRotation() SbRotation SbCylinderProjector::getRotation (const SbVec3f &point1, const SbVec3f &point2) [pure virtual] Returns rotation on the projection surface which re-orients point1 to point2. Implemented in SbCylinderSectionProjector, SbCylinderPlaneProjector, and SbCylinderSheetProjector. void SbCylinderProjector::setCylinder (const SbCylinder &cylinderref) Set cylinder to project onto. const SbCylinder & SbCylinderProjector::getCylinder (void) const Returns projection cylinder. void SbCylinderProjector::setOrientToEye (const SbBoolorienttoeye) Sets whether or not the projection surface should be oriented towards the eye of the viewer. SbBool SbCylinderProjector::isOrientToEye (void) const Returns the state of the cylinder orientation flag. void SbCylinderProjector::setFront (const SbBoolinfront) Set whether to intersect with the outside of the cylinder (isfront equal to TRUE), or the inside. SbBool SbCylinderProjector::isFront (void) const Returns value of the flag which decides whether to intersect with the outside or inside of the cylinder. SbBool SbCylinderProjector::isPointInFront (const SbVec3f &point) const Check if point is on the frontside or the backside of the cylinder. void SbCylinderProjector::setWorkingSpace (const SbMatrix &space) [virtual] Sets the matrix used for converting from the projector's coordinate system to the world coordinate system. Reimplemented from SbProjector. SbBool SbCylinderProjector::intersectCylinderFront (const SbLine &line, SbVec3f &result) [protected] Intersect line with the SbCylinderProjector::cylinder and place the intersection point (if any) in result. Considers setFront() settings. Returns TRUE if line actually hits the cylinder, FALSE if it doesn't intersect with it. Member Data Documentation SbCylinderProjector::intersectFront [protected] Flag which says whether or not we should map to the outside or inside of the cylinder surface. SbCylinderProjector::cylinder [protected] Specification of the projection cylinder. SbCylinderProjector::orientToEye [protected] Which direction the cylindrical surface is oriented. SbCylinderProjector::needSetup [protected] Set to TRUE whenever the projection surface needs to be recalculated according to the setting of the SbCylinderProjector::orientToEye flag. SbCylinderProjector::lastPoint [protected] Stores the previously projected 3D point. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SbCylinderProjector(3)