C Library Functions - loadobj (3)
NAME
loadobj(3f) - [M_draw:OBJECT] Load the object in the file filename as object number n.
(LICENSE:PD)
CONTENTS
Synopsis
Description
Examples
SYNOPSIS
subroutine loadobj(n, filename)
integer n
character*(*) filename
DESCRIPTION
Load the object in the file "filename" as object number n.
EXAMPLES
Sample program:
program demo_loadobj
! test some object-related procedures
use M_draw
implicit none
integer :: env_len, idum
character(len=:),allocatable :: env
!------------------------------------------------------------
! make an object file, which would normally be
! made by a separate program
call voutput(+)
call vinit(nil) ! set up device
call makeobj(3)
call polyfill(.true.)
call color(D_GREEN)
call circle(0.0,0.0,4.0)
call closeobj()
call saveobj(3,"circle.obj")
call vexit()
!------------------------------------------------------------
! CURRENTLY:
! with multiple vinit(3f) calls the environment variable is
! not used without explicitly using it
call get_environment_variable(M_DRAW_OUTPUT,LENGTH=env_len)
if(env_len.ne.0)then
allocate(character(len=env_len) :: env)
call get_environment_variable(M_DRAW_OUTPUT,env)
call voutput(env)
endif
!------------------------------------------------------------
call prefsize(300, 300)
call prefposition(100, 100)
call vinit( ) ! set up device
call ortho2(-5.1,5.3,-5.2,5.4)
call color(D_WHITE) ! set current color
call clear() ! clear screen to current color
call color(D_BLUE)
call move2(-5.0,-5.0)
call draw2(5.0,5.0)
call move2(-5.0,5.0)
call draw2(5.0,-5.0)
call loadobj(3,"circle.obj")
call callobj(3)
call translate(1.0,0.0,0.0)
call translate(0.0,1.0,0.0)
idum=getkey() ! wait for some input
call vexit() ! set the screen back to its original state
!------------------------------------------------------------
end program demo_loadobj
| Nemo Release 3.1 | loadobj (3) | June 29, 2025 |
Generated by manServer 1.08 from ae1ad3fd-09fa-4a29-b414-9dd9c0a7a2a6 using man macros.